url-encoding

URL encoding issues with curly braces

旧城冷巷雨未停 提交于 2019-12-23 04:33:41
问题 I'm having issues getting data from GitHub Archive. The main issue is my problem with encoding {} and .. in my URL. Maybe I am misreading the Github API or not understanding encoding correctly. require 'open-uri' require 'faraday' conn = Faraday.new(:url => 'http://data.githubarchive.org/') do |faraday| faraday.request :url_encoded # form-encode POST params faraday.response :logger # log requests to STDOUT faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end #query =

double escape sequence and RijndaelManaged cryptography in C#

你。 提交于 2019-12-23 01:40:09
问题 I want to pass an id to QueryString of my webpage, as I don't want visitors to see the number, I encode it using RijndaelManaged algorithm, My issue is, this encryption sometimes add a character for example '+' which causes double escape sequence error. I was wondering if there is way to exclude some characters from encryption output. My encryption code is as below: public static string Encrypt(string plainText) { byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); byte[] keyBytes =

How to use Google's Text-to-Speech service for Chinese characters on Android?

不打扰是莪最后的温柔 提交于 2019-12-22 05:01:19
问题 I'm trying to pull an audio file from google's text-to-speech function. Basically, you toss in the link and then concat whatever you want to be spoken at the end of it. I've gotten the below code to work just fine for English, so I think the problem must be how the Chinese characters are getting encoded in the request. Here's what I've got: String text = "text to be spoken"; public static final String AUDIO_CHINESE= "http://www.translate.google.com/translate_tts?tl=zh&q="; public static final

Convert any title to url slug and back from url slug to title

跟風遠走 提交于 2019-12-21 09:17:58
问题 I want to convert any title e.g. of a blog entry to a user friendly url. I used rawurlencode() to do that but it gives me a lot of strange strings like %s . The algorithm should consider german chars like Ö, Ä, etc. I want to make a url from title and be able to get the title by decoding the url. I tried some of this code: http://pastebin.com/L1SwESBn that is provided in some other questions but it seems to be one way. E.g. HÖRZU.de -> hoerzu-de -> HÖRZU.de Any ideas? 回答1: You want to create

How secure is a HTTP GET when the data is URL Encoded?

送分小仙女□ 提交于 2019-12-19 03:22:20
问题 If the data is Url Encoded, is it secure enough to send login credentials over HTTP GET? 回答1: Not at all. URL encoded is easily reversible. You should encrypt the transport layer (i.e. use HTTPS) 回答2: No - URL encoding is meant to make sure all the characters you try to send with a GET request can actually arrive at the other end. It is actually designed to be easily encoded and decoded to prepare data for transport, not for security. 回答3: URL encoding is not any kind of encryption, it just

How secure is a HTTP GET when the data is URL Encoded?

╄→尐↘猪︶ㄣ 提交于 2019-12-19 03:22:05
问题 If the data is Url Encoded, is it secure enough to send login credentials over HTTP GET? 回答1: Not at all. URL encoded is easily reversible. You should encrypt the transport layer (i.e. use HTTPS) 回答2: No - URL encoding is meant to make sure all the characters you try to send with a GET request can actually arrive at the other end. It is actually designed to be easily encoded and decoded to prepare data for transport, not for security. 回答3: URL encoding is not any kind of encryption, it just

Help with C# HttpWebRequest URI losing its encoding

守給你的承諾、 提交于 2019-12-18 13:15:32
问题 Having a problem with HttpWebRequest decoding my encoded URL. var requestUrl = "https://www.google.com/webmasters/tools/feeds/http%3A%2F%2Fwww%2example%2Ecom%2F/crawlissues/"; var request = (HttpWebRequest)WebRequest.Create(requestUrl); When looking at end request URL is becomes: https://www.google.com/webmasters/tools/feeds/http://www.example.com//crawlissues/ Which of course returns a 400 Bad request. I am guessing it is something todo with the URI class rather than HttpWebRequest. How do I

magento _redirect with parameters that have + or /

和自甴很熟 提交于 2019-12-18 07:01:12
问题 seems like a call to $this->_redirect('*/*/myaction',$myargs); does not properly escape the arguments so if $myargs=array(p1=>'string that has + or / within it') the created URL will be something like: ..../myaction/?p1/string%20that%20has%20+%20or%20/%20within%20it causing the getParams collection on the action to have p1 with value 'string that has or ' <- plus sign missing and value broken and ' within it' with no value or something similar. is there any standard way I should handle the

asp .net query string encoding and decoding

孤人 提交于 2019-12-18 06:20:59
问题 I type the following url into my web browser and press enter. http://localhost/website.aspx?paymentID=6++7d6CZRKY%3D&language=English Now in my code when I do HttpContext.Current.Request.QueryString["paymentID"], I get 6 7d6CZRKY= but when I do HttpContext.Current.Request.QueryString.ToString() I see the following: paymentID=6++7d6CZRKY%3D&language=English The thing I want to extract the actual payment id that the user typed in the web browser URL. I am not worried as to whether the url is

asp .net query string encoding and decoding

≯℡__Kan透↙ 提交于 2019-12-18 06:20:26
问题 I type the following url into my web browser and press enter. http://localhost/website.aspx?paymentID=6++7d6CZRKY%3D&language=English Now in my code when I do HttpContext.Current.Request.QueryString["paymentID"], I get 6 7d6CZRKY= but when I do HttpContext.Current.Request.QueryString.ToString() I see the following: paymentID=6++7d6CZRKY%3D&language=English The thing I want to extract the actual payment id that the user typed in the web browser URL. I am not worried as to whether the url is