You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In HTTP GET request, if Host header contains port number (hostname:port), the server doesnt responds with data. For example HTTP request containing following host header will fail
Host: scontent.cdninstagram.com:443
Requests with following host header will succeed
Host: scontent.cdninstagram.com
Most http clients(I tested curl, chrome, and IE) will strip port number if it is default port for the protocol (80 for http ,or 443 for https). However, as per HTTP RFC host header may include port number if it is specified in URI.
14.23 Host
The Host request-header field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource (generally an HTTP URL, as described in section 3.2.2).
In this case host header did not specify port (which is default behavior for curl and most browsers). However If host header explicitly specify port , it fails (The server times out). Following command will fail
Apache and other http servers do not exhibit this problem. As per HTTP RFC, it is perfectly legal to specify port numbers in host header even if they are default port numbers. I used port 443 just an example, same issue appears with port 80.
example behavior from other servers. (They all pass)
Google servers (GSE/GWS/SFFE) curl --header "Host:www.google.com:443" https://www.google.com/images/srpr/logo11w.png -o imge.png
This appears to be a config problem with instagram CDN, and our CDN team is investigating it. Although eliding the port number in the Host header on the client side would fix this, the correct fix is in our infra.
I haven't looked into proxygen code specifically for this problem. Since instagramcdn is running proxygen, and proxygen is facebook product, i thought this is the best place to report it.
Yes, it works now. However I am very disappointed in the way the problem was addressed. Nobody root-caused the issue, and no-one responded to my comments, and then the issue self-healed itself after 1 year or so.
Due to lack of response from maintainers, I had to implement workaround for this issue.
We did root cause the problem, sorry that is was not communicated well on this thread, and that it took so long to solve. Internal to Facebook, we had certain logic for processing requests that was conditional upon the host header that was expecting the default port to be elided. This was not really an issue with the proxygen library, but with the rule logic server side. This has been corrected.
Yes, it works now. However I am very disappointed in the way the problem was addressed. Nobody root-caused the issue, and no-one responded to my comments, and then the issue self-healed itself after 1 year or so.
Due to lack of response from maintainers, I had to implement workaround for this issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/47#issuecomment-258579106, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH4IaVk0sX4VCAKEAZ84Q3GDnE3V3N7hks5q69BTgaJpZM4EYbdV.
Activity
bugok commentedon Jun 4, 2015
@Israr - thanks for reporting.
I'm not sure I understand your request. What is the issue with proxygen?
Israr commentedon Jun 4, 2015
Let me explain with example. This is running proxygen and I can download the resource by executing following command
In this case host header did not specify port (which is default behavior for curl and most browsers). However If host header explicitly specify port , it fails (The server times out). Following command will fail
Apache and other http servers do not exhibit this problem. As per HTTP RFC, it is perfectly legal to specify port numbers in host header even if they are default port numbers. I used port 443 just an example, same issue appears with port 80.
example behavior from other servers. (They all pass)
curl --header "Host:www.google.com:443" https://www.google.com/images/srpr/logo11w.png -o imge.pngcurl --header "Host:c.s-microsoft.com:443" https://c.s-microsoft.com/en-us/CMSImages/mslogo.png?version=856673f8-e6be-0476-6669-d5bf2300391d -o img.pngbugok commentedon Jun 4, 2015
@Israr - what do you mean by "running proxygen"? What process are you running? The echo server?
afrind commentedon Jun 4, 2015
This appears to be a config problem with instagram CDN, and our CDN team is investigating it. Although eliding the port number in the Host header on the client side would fix this, the correct fix is in our infra.
Israr commentedon Jun 4, 2015
I haven't looked into proxygen code specifically for this problem. Since instagramcdn is running proxygen, and proxygen is facebook product, i thought this is the best place to report it.
Israr commentedon Sep 4, 2015
This issue is still not fixed. Is it a proxygen issue or instagram CDN?
w-o-o commentedon Nov 4, 2016
@Israr it works well for me now. Reopen this if you believe it is still an issue
$ curl --header "Host:scontent.cdninstagram.com:443" https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s150x150/e15/11049316_1583549288528575_1352209504_n.jpg -o imge.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6163 100 6163 0 0 8467 0 --:--:-- --:--:-- --:--:-- 8465
Israr commentedon Nov 5, 2016
Yes, it works now. However I am very disappointed in the way the problem was addressed. Nobody root-caused the issue, and no-one responded to my comments, and then the issue self-healed itself after 1 year or so.
Due to lack of response from maintainers, I had to implement workaround for this issue.
afrind commentedon Nov 7, 2016
We did root cause the problem, sorry that is was not communicated well on this thread, and that it took so long to solve. Internal to Facebook, we had certain logic for processing requests that was conditional upon the host header that was expecting the default port to be elided. This was not really an issue with the proxygen library, but with the rule logic server side. This has been corrected.
From: IK [email protected]
Reply-To: facebook/proxygen [email protected]
Date: Friday, November 4, 2016 at 5:39 PM
To: facebook/proxygen [email protected]
Cc: Alan Frindell [email protected], Comment [email protected]
Subject: Re: [facebook/proxygen] Host header (#47)
Yes, it works now. However I am very disappointed in the way the problem was addressed. Nobody root-caused the issue, and no-one responded to my comments, and then the issue self-healed itself after 1 year or so.
Due to lack of response from maintainers, I had to implement workaround for this issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/47#issuecomment-258579106, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH4IaVk0sX4VCAKEAZ84Q3GDnE3V3N7hks5q69BTgaJpZM4EYbdV.
afrind commentedon Mar 1, 2017
As mentioned before, this was an issue with the live site and not the library, and the live-site issue was fixed.
ci: fix Mac builds broken by llvm@20 pin in #47