Title: LocationHtml5Url search() returns undefined if server rewrites base URL · Issue #11223 · angular/angular.js · GitHub
Open Graph Title: LocationHtml5Url search() returns undefined if server rewrites base URL · Issue #11223 · angular/angular.js
X Title: LocationHtml5Url search() returns undefined if server rewrites base URL · Issue #11223 · angular/angular.js
Description: Hi, I encountered a problem where if the server rewrites part of the baseHref, the LocationHtml5Url $location.search() will return undefined, instead of an empty object. For example, if I request: http://www.example.com/Username and the ...
Open Graph Description: Hi, I encountered a problem where if the server rewrites part of the baseHref, the LocationHtml5Url $location.search() will return undefined, instead of an empty object. For example, if I request: ...
X Description: Hi, I encountered a problem where if the server rewrites part of the baseHref, the LocationHtml5Url $location.search() will return undefined, instead of an empty object. For example, if I request: ...
Opengraph URL: https://github.com/angular/angular.js/issues/11223
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"LocationHtml5Url search() returns undefined if server rewrites base URL","articleBody":"Hi,\n\nI encountered a problem where if the server rewrites part of the baseHref, the LocationHtml5Url $location.search() will return undefined, instead of an empty object.\n\nFor example, if I request: `http://www.example.com/Username`\n\nand the server rewrites it as `http://www.example.com/username`\n\nwhen the LocationProvider.$get calls $$parseLinkUrl, it doesn't call $$parse like it normally would, which would call parseAppUrl and set locationObj.$$search.\n\nSince $$parseLinkUrl is comparing the rewritten appBase (`http://www.example.com/username`) against the requested initialUrl (`http://www.example.com/Username`), the beginsWith check fails and it doesn't follow the same code path as if the url hadn't been rewritten.\n\nI can't say I'm familiar enough with the code to suggest a fix, but it seems like parseAppUrl sets up important state for the $location service, and not calling it during instantiation causes problems.\n\nEDIT: forgot to mention, I encountered this running angular-1.3.6.js.\n","author":{"url":"https://github.com/akerfoot","@type":"Person","name":"akerfoot"},"datePublished":"2015-03-03T02:53:38Z","url":"https://github.com/angular/angular.js/issues/11223"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4d6fe5d6-557a-5e6e-0e50-a8bbe52c1b15 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1BE:C804D:42C2D2:5B569E:6AFE0FEB |
| html-safe-nonce | 86dd59b91d8b98c757168a8bbdeac75891e499776b3ff67ac0efc51c160d6f84 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUJFOkM4MDREOjQyQzJEMjo1QjU2OUU6NkFGRTBGRUIiLCJ2aXNpdG9yX2lkIjoiMjg0MTc5NDI2NzQzMTQ0MDM2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 28c96a74eccb07ac83f9fdac2b87f34f17ea1ecc820875a5d924136bd12f26d6 |
| hovercard-subject-tag | issue:59587610 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular.js/11223/issue_layout |
| twitter:image | https://opengraph.githubassets.com/afd0e14ddc449c47eb02dcd692bea77a5828f540ed93ee0736c13e68784ffa8a/angular/angular.js/issues/11223 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/afd0e14ddc449c47eb02dcd692bea77a5828f540ed93ee0736c13e68784ffa8a/angular/angular.js/issues/11223 |
| og:image:alt | Hi, I encountered a problem where if the server rewrites part of the baseHref, the LocationHtml5Url $location.search() will return undefined, instead of an empty object. For example, if I request: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akerfoot |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1fd4053be37b4bd545b4f38f1cecad058c343776acf2cbc6806316f26270e55e |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular.js git https://github.com/angular/angular.js.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 460078 |
| octolytics-dimension-repository_nwo | angular/angular.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 460078 |
| octolytics-dimension-repository_network_root_nwo | angular/angular.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 635a57b3d0df6bc21c0f39fc7078888fb90e4066 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width