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
When it comes to examples I think the reported behaviour is true for most of cases but to be specific if I create SB with default settings and send request to the root URL it's already reproducible, for example:
$ curl -v https://rafal-testsb.servicebus.windows.net 2>&1|grep HTTP/1.1
> GET / HTTP/1.1
< HTTP/1.1 200 OK
$ curl -v -I https://rafal-testsb.servicebus.windows.net 2>&1|grep HTTP/1.1
> HEAD / HTTP/1.1
< HTTP/1.1 500 Internal Server Error
HTTP/1.1 500 Internal Server Error
I noticed that sometimes HEAD request to the root URL returns 404 response instead of 500. I don't really know when it's 404 and when it's 500. Anyway HEAD responses are different than GET responses (from my experience always 200 OK).
I guess there may be other scenarios for example on the entity level instead of root URL where http response codes might be different than in the example above but still not the same for HEAD and GET.
There might be various reasons why having consistent responses for HEAD and GET can be desirable. Examples that come to my mind are:
loadbalancers that often use HEAD to test backend health
manual inspection done with curl -I where HEAD response != 200 may lead to confusion
Description
This is a follow-up to Azure support request ID | 2406240050002544
Actual Behavior
http status code for the same HEAD and GET http requests is different (404 NOT FOUND for HEAD and 200 OK for GET).
This seems to be a protocol violation: https://www.rfc-editor.org/rfc/rfc9110.html#name-head
Expected Behavior
Azure service bus should return the same HTTP response codes for HEAD and GET requests.
The text was updated successfully, but these errors were encountered: