Questions tagged [http-head]
54 questions
3
votes
2 answers
Reliability of using HEAD Request to Check Web Page Status
I've been testing a small app I've written that basically does a http HEAD request to check whether a page exists, redirects etc. I've noticed that some pages respond differently to HEAD than GET requests. For example:
curl -I…

Paul
- 655
- 1
- 8
- 19
3
votes
1 answer
Will an HTTP HEAD request ever be cached by phone / browser
Lets say I have a file on a server with cache-headers indicating it should be cached. Will the response of a HEAD request to that file be cached as well?

Itai Hanski
- 8,540
- 5
- 45
- 65
2
votes
1 answer
Unknown reason for Timeout on HTTP HEAD request
I'm using ASP.NET 3.5 to build a website. One area of the website shows 28 video thumbnail images, which are jpeg's hosted on another webserver. If one or more of these jpegs do not exist, I want to display a locally hosted default image to the…

BG100
- 4,481
- 2
- 37
- 64
2
votes
1 answer
Making HTTP HEAD request with timeout in Ruby
In a Rails app, I'd like to make a HTTP HEAD request for a resource (a user-provided URL), to make sure that it exists. I'd also like a timeout, to ensure that the method fails after spending a reasonable period of time waiting. What is the most…

jrdioko
- 32,230
- 28
- 81
- 120
2
votes
1 answer
Why does ASP.NET Core routing result in exceptions for HEAD requests on Azure?
I'm seeing a lot of the same exceptions in Application Insights for HEAD requests for many paths on my website:
System.ArgumentException: The leading '?' must be included for a non-empty query. (Parameter 'value')
The website is running in Azure…

Mack Male
- 77
- 1
- 6
2
votes
2 answers
Add support for [HttpHead] and [HttpGet] in MVC controller method
I have an MVC method as follows which supports the [HttpGet] attribute.
[HttpGet]
[ActionName("Index")]
public ActionResult IndexGet(string l)
{
return View();
}
However, I'm noticing in our web server log files we are…

neildt
- 5,101
- 10
- 56
- 107
2
votes
1 answer
Validate curl CURLOPT_HTTPHEADER request on server side
I have developed a small webservice which will take user query and returns data as json response. Everything working fine. But I was wondering how to set and compare
Authorization token from the client side as part of the curl header. This is my…

user3408779
- 981
- 2
- 19
- 43
2
votes
1 answer
HttpClient Head request argument always null
I am building a WebAPI service that will be used for application updates, I have a HEAD and GET method written that both take a Version object which denotes the version that a client is upgrading to.
I have written a client for the application to…

Neil Stevens
- 3,534
- 6
- 42
- 71
2
votes
1 answer
Java HttpURLConnection HEAD
I am trying to get the apache version from a list of servers. I am thinking about parsing the headers, however I am unable to send a HEAD but it will work with GET POST etc.
This is my code:
import java.io.BufferedReader;
import…

Nick Mckenna
- 125
- 1
- 6
1
vote
1 answer
Google Storage HEAD response missing content-length
I am using a library (Apache Libcloud) to make requests to google storage.
Inside the library, a HEAD request is made to the URL that is queried within google storage.
You can find the code for it here, search for def get_object.
The important line…

RunOrVeith
- 4,487
- 4
- 32
- 50
1
vote
1 answer
Why shouldn't we allow body in a GET or HEAD request?
I'm coming to this from the InfoSec side, not the AppDev side, I just wanted to put that caveat in first. The issue is that my WAF is blocking certain images with the response, HTTP protocol compliance failed:Body in GET or HEAD requests. I need to…

centre21
- 21
- 4
1
vote
0 answers
Python Client and Server, implementing HTTP GET
Hopefully I can explain this without sounding like a fool. I created a client and server in python. The plan was to open a file that I have stored and read the file and display it. Server sends to client, client receives and sends and acceptance…

VinAbb
- 25
- 2
1
vote
1 answer
REST: Should HEAD always be supported when GET is?
I recently found a REST api which didn't support HEAD (i.e. Method not supported) but that supported GET.
Should HEAD always be supported in REST clients?
Or are there valid reasons to support GET without supporting HEAD ?

jayunit100
- 17,388
- 22
- 92
- 167
1
vote
2 answers
Rails: periodically use HEAD to check for page changes
I have a Rails app implementing a game, so it's expected that a player will leave a browser open at the game page. When player Alan takes an action himself, I use AJAX requests to update the game page Alan is viewing to reflect the new state.…

Chowlett
- 45,935
- 20
- 116
- 150
1
vote
1 answer
"303 See other" in HTTP HEAD response
I am building an ASP.NET Azure Web Application (Web Role) which controls access to files stored in Azure Blob Storage.
On a GET request, my HttpHandler authenticates the user and creates a Shared Access Signature for this specific file and user…

ulvesked
- 429
- 3
- 11