query-string

google oauth callback appending parameters multiple times

喜欢而已 提交于 2019-12-23 04:59:16
问题 We have successfully using Google OAuth for years now, but it suddenly stopped working a few days ago. In looking into this, it appears that the after the user clicks "Allow" to grant access to the requested scope, Google is redirecting to our callback page (as it always has) but now the code and scope parameters are being appended to the URL multiple times (example below). Given querystring length limits on our web server, this is now throwing a 404.15 error. Since we have made no recent

HTML5 Local Storage item not being saved correclty

眉间皱痕 提交于 2019-12-23 04:49:27
问题 I'm trying to save a value from a url query string that needs to be inserted into forms an any page the user navigates to, but so far I can't get the code to work past the initial landing page that contains the original query string. Using this method to grab the query string value for X, and save it in localStorage for key Xcode: <script> var field = 'x'; var url = window.location.href; if(url.indexOf('?' + field + '=') != -1) { function getUrlVars() { var vars = [], hash; var hashes =

Discrepancies of Percent Encoding for URLs

♀尐吖头ヾ 提交于 2019-12-23 03:57:20
问题 After viewing this previous SO question regarding percent encoding, I'm curious as to which styles of encodings are correct - the Wikipedia article on percent encoding alludes to using + instead of %20 for spaces, while still having an application/x-www-urlencoded content type. This leads me to think the + vs. %20 behavior depends on which part of the URL is being encoded. What differences are preferred for path segments vs. query strings? Details and references for this specification would

Hide Querystring in MVC action

醉酒当歌 提交于 2019-12-22 18:29:25
问题 I want to hide the Querystring into My controller's action. In my application scenariois something like this: 1) I have opened new action into new Window as: var check="Particular String" var url = rootUrl("Home/Preview?Docs=" + check); window.open(url, '_blank'); 2) On controller's Side I have used some code into Controller's action as: public ActionResult Preview(string Docs) { TempData["Docs"] = Docs; return RedirectToAction("UnInvoicedPreview"); } My Query:: 1) when opening new window it

query string react-router path

时光毁灭记忆、已成空白 提交于 2019-12-22 18:06:24
问题 I am using react-router 3.0.2 and trying to configure router path with query string. This is how I have configured my router: <Router history={browserHistory}> <Route path="abc/login.do" component={LoginComponent}/> <Route path="abc/publicLoginID.do?phase=def" component={VerifyComponent} /> <Route path="abc/publicLoginID.do?phase=ghi" component={ImageComponent}/> <Route path="*" component={LoginComponent}/> </Router> I understand this is not the right way to specify query string (?) in "Route

Passing hidden field from one page to another in querystring

大憨熊 提交于 2019-12-22 15:01:10
问题 I want to pass a query in a hidden filed from 1 page to another by querystring. Can anyone help me out with the logic? 回答1: It's worth taking the time to learn jQuery. It's not very complicated, and it makes writing javascript much easier. There are also many jQuery plugins, such as jquery.url. Also, as other posters have suggested, you may not wish to put the hidden field's value in the query string if you care about it being displayed to the user. However, if the data is present in a hidden

Using 'querystring.parse' built-in module's method in Node.JS to read/parse parameters

别等时光非礼了梦想. 提交于 2019-12-22 13:07:27
问题 Scenario : Consider the following code: var querystring = require('querystring'); var ParamsWithValue = querystring.parse(req._url.query); Then I am able to read any query string's value. E.g: If requested string is http://www.website.com/Service.aspx?UID=Trans001&FacebookID=ae67ea324 I can get the values of query string with codes ParamsWithValue.UID & ParamsWithValue.FacebookID respectively. Issue: I am able to get the values of any number of parameters passed in the same way described

How to retrieve query string value from URL value stored in a variable?

ε祈祈猫儿з 提交于 2019-12-22 06:48:30
问题 $url = 'http://www.domain.com/file.php?dir=r&hl=100,200&ord=3&key=a+b+c'; If it were a url I could get value of hl by, say, $_GET['hl'] . but how do I retrieve the same from $url string. Thanks. 回答1: Here are the steps: $url = 'http://www.domain.com/file.php?dir=r&hl=100,200&ord=3&key=a+b+c'; print "<pre>"; print $url; $url_parsed = parse_url($url); print_r($url_parsed); parse_str($url_parsed['query'], $url_parts); print_r($url_parts); print "</pre>"; Produces this output: http://www.domain

Get the query string value and display it in my html page

╄→гoц情女王★ 提交于 2019-12-22 06:00:43
问题 After redirecting to home.html page, i can see the querystring values which i had given in the previous page. Home.html?FirstName=dd&LastName=ee&smtButton=Submit And am getting the result as: firstname = undefined lastname = undefined age = undefined Could anyone help me to solve this? JS: function getParams() { var idx = document.URL.indexOf('?'); var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx + 1, document.URL.length).split('&'); for (var i = 0; i < pairs

Get the query string value and display it in my html page

蓝咒 提交于 2019-12-22 06:00:39
问题 After redirecting to home.html page, i can see the querystring values which i had given in the previous page. Home.html?FirstName=dd&LastName=ee&smtButton=Submit And am getting the result as: firstname = undefined lastname = undefined age = undefined Could anyone help me to solve this? JS: function getParams() { var idx = document.URL.indexOf('?'); var params = new Array(); if (idx != -1) { var pairs = document.URL.substring(idx + 1, document.URL.length).split('&'); for (var i = 0; i < pairs