url-encoding

Saml 2.0 request encoding

风流意气都作罢 提交于 2019-12-12 03:29:37
问题 I'm trying to encode a Saml 2.0 request in Java but when i decode it using tools online i get weird characters. This is the input string: <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="_8d7bd828-6f91-477a-b158-22d693f56972" Version="2.0" IssueInstant="2013-04-19T14:07:53Z" AssertionConsumerServiceURL="http://test"> <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"> test </saml:Issuer> <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid

Cannot receive form data in Spring application sent from another java application

北城余情 提交于 2019-12-12 03:25:34
问题 I am trying to post an HTML form from a legacy java application to a Spring based java application.But the form field cannot be received there. can you please help on how to resolve the issue. Note: I am posting the form from tomcat 5.5 to the new Spring application in tomcat 6 though Both the containers reside in the same server. Below i have given the code snippets: The form that I am sending from the legacy application: <form id ="user_Spring" method="POST" action="http://new_application

URL Encoding Strings that aren't valid URIs

断了今生、忘了曾经 提交于 2019-12-12 02:25:38
问题 I'm not sure I understand the URI object completely to do this properly. I want to be able to convert a string into a url-encoded string. For example, I have a servlet acting as a file handler and I need to specify the file name in the header - response.setHeader("Content-disposition", "attachment;filename=" + new URI(filename).toUrl()); As expected, I get a URISyntaxException because the string I'm encoding isn't in proper URI form. How can I encode strings instead of URLs? I can't get the

Encoding/decoding REST path parameters

风格不统一 提交于 2019-12-12 02:09:57
问题 I am trying to find the best way of getting round a design flaw in a web app I'm helping to support. One part of the service passes a parameter ("myparam") to a .jsp page, which in turn calls a REST service including our myparam as a path parameter. The design flaw bit is that myparam should be passed as a form parameter, since it can be free text. However, we cannot change the implementation as other parties are involved at the .jsp end of things. My solution was to encode the myparam using

Unable to URL encode { } for object filters in softlayer REST URI

末鹿安然 提交于 2019-12-12 01:13:43
问题 I am calling a Get method through Rest and my URI contains { } for object filters in Softlayer. I have used %7B for { and %7D for }, but I get java.net.URISyntaxException. The URI also contains @ which I have replaced with %40. This is working. I am using http Client to execute my Rest Call. The URI works fine on Postman, both with and without URL Encoding. 回答1: Here two way to skip or handle @: how is '@' handled in the softlayer Rest calls Another way to skip special characters would be,

How do you put an authentication token on URL as query parameter?

ぐ巨炮叔叔 提交于 2019-12-11 16:34:45
问题 I'm doing a PayPal Express Checkout on my ASP.Net MVC site. The site uses token authentication so I'm trying to put the token on the PayPal return URL as a query parameter. I have a handler that intercepts all requests to my site and extracts the token from the URL or the request header. Works fine getting it from the header but I get the following exception when its a query parameter. I get the token from my claims principal and don't do any encoding/decoding. I've tried this method but had

Unable to allow these characters in URL:- % / \ # +

一个人想着一个人 提交于 2019-12-11 11:57:20
问题 About the system I have URLs of this format in my project:- http://project_name/browse_by_exam/type/tutor_search/keyword/class/new_search/1/search_exam/0/search_subject/0 Where keyword/class pair means search with "class" keyword. Following is my htaccess file:- ##AddHandler application/x-httpd-php5 .php Options Includes +ExecCGI Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine on ############To remove index.php from URL RewriteCond $1 !^(index\.php|resources|robots\.txt)

encoding url in javascript not encoding &

十年热恋 提交于 2019-12-11 07:36:55
问题 I am encoding the following string in javascript encodeURI = "?qry=M & L"; This give me an output qry=m%20&%20l So the "&" from M & L is not getting encoded. What should i do? 回答1: Does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI "scheme" can possibly contain. Reference encodeURI will not encode following special charcaters A-Z a-z 0-9 ; , / ? : @ & = + $ - _ . ! ~ * ' ( ) # let uri = "?qry=M & L"

ASP.NET MVC does not understand mixed url encoding (UTF-8/Latin-1)

耗尽温柔 提交于 2019-12-11 05:28:43
问题 I have two URLs with parameters http://localhost:8041/Reforge.aspx?name=CyanГ http://localhost:8041/Reforge.aspx?name=Cyanì In first URL Firefox encodes last charecter (Г) as %D0%93 (correctly in UTF-8). In second URL Firefox encodes last character (ì) as %EC (correctly in ISO-8859-1) ASP.NET MVC can be configured using element in web.config to either assume UTF-8 or ISO-8859-1. But Firefox flips between encodings depending on the context. Note that UTF-8 can be unambiguously distinguished

how to restrict price range in google shopping API

隐身守侯 提交于 2019-12-11 03:48:56
问题 I'm using the Google Shopping API to try to retrieve products that have an "order" of magnitud of a certain number, or approximation to this. For example If I would to select products that are between th $40 - $60 price range : $50 +/- $10. What should I add in the URL search string? I know I can rank by price like this (according to the API): GET https://www.googleapis.com/shopping/search/v1/public/products?key=key&country=US&q=%22mp3+player%22%7Cipod&rankBy=price%3Adescending 回答1: Nevermind