Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8) (Read 1961 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Latest beta 8 gives HTTP 403 error when accessing GitHub API. I believe this problem started to happen in beta 7.

Steps to reproduce:
Code: [Select]
  auto request = static_api_ptr_t<http_client>()->create_request("GET");
  request->run("https://api.github.com", abort_callback_dummy());
This code results in PP::httpRequest::error exception with "Forbidden (403)" message.

Few observations:

Comparing to 1.3.17, HTTP request lacks 'Accept' and 'User-Agent' headers. The latter troubles GitHub (documentation).

The question is: from now on, should components add 'Accept' and 'User-Agent' headers by their own if they need these headers? Or this is something that was just overlooked?

Also, even being invoked with "https://..." URL, http_request in beta 8 first performs request to "http://..." URL (in 1.3.17 it performs request directly to https://...). Is there a reason for that?

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #1
Noted, thanks for reporting - this will be fixed in the next update.

I switched to a different HTTP client implementation in 1.4 beta 7 - or more specifically, to a different fork of the same implementation.
Microsoft Windows: We can't script here, this is bat country.

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #2
I confirmed and fixed the two first issues: missing "Accept" and "User-Agent".
However I see no trace of plain HTTP requests made instead of HTTPS. Do you have a wireshark log of this?
Microsoft Windows: We can't script here, this is bat country.

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #3
It seems, HTTP requests are made when Proxy is set to 'Use Internet Explorer settings' (when it is set to 'No proxy', request goes directly to 443 port). Reproduced on clean beta 8 using 'Add location...' with https://api.github.com. Log is in attach (Fiddler). On 1.3.17 that does not happen (request goes directly to HTTPS). OS is Win 8.1 x64 with all updates.

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #4
Problem recreated, thanks for the details.
Various proxy server handling bugs are being addressed for beta 9.
Microsoft Windows: We can't script here, this is bat country.

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #5
New beta posted, relevant bugs should be gone.
Microsoft Windows: We can't script here, this is bat country.

Re: http_client: HTTP 403 error accessing GitHub (foobar2000 1.4 beta 7 and 8)

Reply #6
Confirmed. All issues are resolved in beta 9. Thank you.