url-encoding

mod-rewrite forwarding without changing URL

给你一囗甜甜゛ 提交于 2019-12-11 02:37:27
问题 I have a small problem with my Apache configuration when creating "pretty" URLs. I've got it to the stage where typing (or linkig for that matter) to index.html forwards you to index.php?pageID=Forside that is exactly what I want. But how can I get index.html to stay in the address bar of the browser? Right now it forwards and changes the URL to the original one. Here my .htaccess: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d

Outlook handling of quoted url parameters in mailto link

左心房为你撑大大i 提交于 2019-12-11 01:11:45
问题 I'm attempting to populate the body of a mailto link with an html link. The target browser is IE 7+ and mail client is Outlook 2007+. Before I ask my question, i'll acknowledge the fact that the body parameter is intended for short text messages as called out here: https://stackoverflow.com/a/4304779/573083 and detailed here: The special "body" indicates that the associated is the body of the message. The "body" field value is intended to contain the content for the first text/plain body part

Alamofire request stating extra argument for both parameters and method

。_饼干妹妹 提交于 2019-12-10 23:02:23
问题 After updating from swift 2.3 to 3, I have the following issue with NSMutableURLRequest in my Router class: var URLRequest: NSMutableURLRequest { let URL = Foundation.URL(string: Router.baseURLString)! let mutableURLRequest = NSMutableURLRequest(url: URL.appendingPathComponent(path)) mutableURLRequest.httpMethod = method.rawValue switch self { case .controlRequest(let a, let b, let c): let req : RegisterServer.Request = RegisterServer.Request() req.a = a req.b = b req.c = c let reqAsJsonStr =

HTML: prevent url-encoding of POST form

和自甴很熟 提交于 2019-12-10 18:33:19
问题 I have an HTML form which must be posted to a URL. I would like the form to POST one variable named DATA like so: DATA: somevar=someval&somevar2=someotherval I'm having trouble doing this. It seems by default, forms urlencode the data, resulting in: DATA: somevar%3Dsomeval%26somevar2%3Dsomeotherval Changing the form's enc-type to "text/plain" results in: DATA: somevar=someval SOMEVAR2: someotherval Is there any way I can have a form actually just send the data as above? 回答1: No, you can't do

How to formally insert URL space (%20) using Python? [duplicate]

坚强是说给别人听的谎言 提交于 2019-12-10 15:35:51
问题 This question already has answers here : How to urlencode a querystring in Python? (12 answers) Closed 4 years ago . When a mutli-word search term is entered in ebay, the resultant URL looks something like (for example "demarini cf5 cf12"): http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw=demarini%20cf5%20cfc12 I wish to construct this URL in Python so it can be accessed directly. So it's case of concatenating the base URL: http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&_nkw= ...

php file_get_contents($url) & turns into &

懵懂的女人 提交于 2019-12-10 03:50:19
问题 I am trying to make a request to the coinbase api like this $url = "https://api.gdax.com/products/BTC-USD/candles?start=".date($format,$starting_date)."&end=".date($format,$ending_date)."&granularity=".$granularity; and then I pass that in file_get_contents($url) but it gives me an error file_get_contents( https://api.gdax.com/products/BTC-USD/candles?start=2015-05-07&end=2015-05-08&granularity=900 ): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request. The problem of course

URL Parameter encoding in MVC .NET

二次信任 提交于 2019-12-09 18:13:17
问题 I have a controller in an MVC 4 .NET application that receives a string as a parameter from an URL. This comes from an aspx page redirected to the controller in Route.config . If I send this value for the parameter in the client: fwdgerhb+bhrth+ftrgbhrt I get the following value at the server: fwdgerhb bhrth ftrgbhrt The server is interpreting the URL parameter value as an encoded URL and replaces + by . But it has not been URL encoded. This will occur for other combinations of special chars

.NET MVC Routing w/ Url Encoding Problems

别说谁变了你拦得住时间么 提交于 2019-12-09 16:13:43
问题 I have the following routing code: routes.MapRoute( "email-validated/{sessionId}", "email-validated/{sessionId}", new { controller = "User", action = "EmailValidated", sessionId = UrlParameter.Optional } ); When I hit the route w/ something that is url encoded it won't match the route for %2f, %2b and some other escaped characters. It also won't match for non url encoded (things w/ + etc) For instance This works: email-validated/XQiKC6KMM

What is the behavior of Hash(#) in query string

柔情痞子 提交于 2019-12-09 09:30:21
问题 I am sending the below url with query string. In the query string one parameter "approverCmt" has value with hash(#). "/abc/efd/xyz.jas?approverCmt=Transaction Log #459505&batchNm=XS_10APR2015_082224&mfrNm=Timberland" In server side when I tried to retrieve it from the request I get approverCmt = Transaction Log -----> "#459505" is missing batchNm = null mfrNm = null And If I remove hash(#) from query string or If I replace # with %23 every thing works fine I don't understand why I am getting

What is the encoding of Chinese characters on Wikipedia?

两盒软妹~` 提交于 2019-12-09 07:48:29
问题 I was looking at the encoding of Chinese characters on Wikipedia and I'm having trouble figuring out what they are using. For instance "的" is encoded as "%E7%9A%84" (see here). That's three bytes, however none of the encodings described on this page uses three bytes to represent Chinese characters. UTF-8 for instance uses 2 bytes. I'm basically trying to match these three bytes to an actual character. Any suggestion on what encoding it could be? 回答1: >>> c='\xe7\x9a\x84'.decode('utf8') >>> c