question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HEAD request times out

See original GitHub issue

I am trying to do HEAD requests against some URLs before doing the actual download, but the requests just times out. An example URL:

http://www.sunhotels.net/SunHotels.net/HotelInfo/hotelImage.aspx?full=1&id=528422

I have made a failing test here: https://gist.github.com/stigkj/fce1239ae09a3327b88bf134c77ef1d1

curl -I against the URL does not hang. OkHttp version is 3.9.0.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
yschimkecommented, Sep 9, 2017

Disabling gzip makes it pass

    Request request = new Request.Builder()
            .head()
            .url("http://www.sunhotels.net/SunHotels.net/HotelInfo/hotelImage.aspx?full=1&id=528422")
            .header("Accept-Encoding", "identity")
            .build();
0reactions
yschimkecommented, Sep 15, 2017

@wmjwmj828 Are you also making requests to www.sunhotels.net? This error is caused by a badly behaved web server, so doesn’t apply generally, just to this server.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle timeout error in request.head(url)?
I want to stop requests.head(url) if it does not exist or is not loading for any reason. How to achieve this? python ...
Read more >
Using curl to make a HEAD request with a hard timeout
Timeouts can be controlled with several options depending on which bit of the request you want to time out. From the man page:...
Read more >
HEAD request inexplicably failing · Issue #5556 - GitHub
A HEAD request to this website is inexplicably giving RemoteDisconnected. A GET request to the same URL succeeds. Issuing a HEAD request ......
Read more >
408 Request Timeout - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 408 Request Timeout response status code means that the server would like to shut down this unused ...
Read more >
Hypertext Transfer Protocol (HTTP) Timeouts - IETF Datatracker
A Request-Timeout header is defined for Hypertext Transfer Protocol (HTTP). This end-to-end header informs an origin server and any ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found