redirectURL is not matching location response header
See original GitHub issueAccording to http://www.softwareishard.com/blog/har-12-spec/
redirectURL [string] - Redirection target URL from the Location response header.
Example:
$ curl http://github.com/ -I
HTTP/1.1 301 Moved Permanently
Content-length: 0
Location: https://github.com/
Connection: close
$ chrome-har-capturer http://github.com/
...
"request": {
"method": "GET",
"url": "http://github.com/",
"httpVersion": "http/1.1",
"cookies": [],
"headers": [
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36"
}
],
"queryString": [],
"headersSize": 178,
"bodySize": -1
},
"response": {
"status": 307,
"statusText": "Internal Redirect",
"httpVersion": "http/1.1",
"cookies": [],
"headers": [
{
"name": "Location",
"value": "https://github.com/"
},
{
"name": "Non-Authoritative-Reason",
"value": "HSTS"
}
],
"redirectURL": "",
"headersSize": 97,
"bodySize": 0,
"_transferSize": 97,
"content": {
"size": 0,
"mimeType": "",
"compression": 0
}
},
...
From Chrome (Save as HAR):
...
"request": {
"method": "GET",
"url": "http://github.com/",
"httpVersion": "unknown",
"headers": [
{
"name": "Upgrade-Insecure-Requests",
"value": "1"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.44 Safari/537.36"
}
],
"queryString": [],
"cookies": [],
"headersSize": -1,
"bodySize": 0
},
"response": {
"status": 307,
"statusText": "Internal Redirect",
"httpVersion": "unknown",
"headers": [
{
"name": "Location",
"value": "https://github.com/"
},
{
"name": "Non-Authoritative-Reason",
"value": "Delegate"
}
],
"cookies": [],
"content": {
"size": 0,
"mimeType": "x-unknown"
},
"redirectURL": "https://github.com/",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 0
},
...
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Location - HTTP - MDN Web Docs - Mozilla
The Location response header indicates the URL to redirect a page to. It only provides a meaning when served with a 3xx (redirection)...
Read more >How to get the location header in Google Apps Script
You need to use fetch(url, params) method of UrlFetchApp class and supply followRedirects parameter set to false : var response = UrlFetchApp.fetch(tURL, ...
Read more >Modifying HTTP Response Headers | Microsoft Learn
For example when an application behind a reverse proxy returns a redirect response, the HTTP Location header in the response may not ......
Read more >Redirect URL, Modify Headers & Mock APIs
Web Debugging Proxy to Intercept & Modify HTTPs Requests - Redirect URL, Modify Headers, Mock APIs, Modify Response, Insert Scripts.
Read more >Listeners for your Application Load Balancers
You can specify the names of standard or custom HTTP header fields. The header name and the match evaluation are not case-sensitive.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It should work now, I thought headers were normalised by Chrome.
I thought I did this… Done! Thanks for the reminder.