# HEAD no longer works in 5.4.1

**URL:** <https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321>\
**Category:** Elasticsearch\
**Created:** [June 14, 2017, 7:59am UTC](https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321 "2017-06-14T07:59:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwjvaughan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dwjvaughan/32/10648_2.png) [@dwjvaughan](https://discuss.elastic.co/u/dwjvaughan)\
**Post date:** [June 14, 2017, 7:59am UTC](https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321/1 "2017-06-14T07:59:14Z")

</div>

Hi all,

Not sure if this is intended behavior, but I've noticed HEAD no longer works since upgrading to 5.4.1. For example, on my 5.3.2 instance, this works:

`curl -XHEAD -s -o /dev/null -w %{http_code} localhost:9200/.kibana`

On 5.4.1 this just hangs. There's no security on the 5.4.1 instance.

I did a test from an external server so I could grab a tcpdump just in case it helps:

This hangs:

```
08:49:48.392897 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [S], seq 4061483896, win 29200, options [mss 1379,sackOK,TS val 1854819303 ecr 0,nop,wscale 7], length 0
08:49:48.392938 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [S.], seq 1670349589, ack 4061483897, win 26847, options [mss 8961,sackOK,TS val 1921447501 ecr 1854819303,nop,wscale 7], length 0
08:49:48.417434 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [.], ack 1, win 229, options [nop,nop,TS val 1854819327 ecr 1921447501], length 0
08:49:48.417551 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [P.], seq 1:95, ack 1, win 229, options [nop,nop,TS val 1854819327 ecr 1921447501], length 94
08:49:48.417570 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [.], ack 95, win 210, options [nop,nop,TS val 1921447526 ecr 1854819327], length 0
08:49:48.418932 IP ES-5.4.1.wap-wsp > source_server.42320: Flags [P.], seq 1:89, ack 95, win 210, options [nop,nop,TS val 1921447527 ecr 1854819327], length 88
08:49:48.445049 IP source_server.42320 > ES-5.4.1.wap-wsp: Flags [.], ack 89, win 229, options [nop,nop,TS val 1854819354 ecr 1921447527], length 0

```

This works:

```
08:45:24.203015 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [S], seq 3887748958, win 29200, options [mss 1379,sackOK,TS val 1854390542 ecr 0,nop,wscale 7], length 0
08:45:24.203087 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [S.], seq 41657394, ack 3887748959, win 26847, options [mss 8961,sackOK,TS val 3541047347 ecr 1854390542,nop,wscale 7], length 0
08:45:24.265286 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 1, win 229, options [nop,nop,TS val 1854390604 ecr 3541047347], length 0
08:45:24.265333 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [P.], seq 1:95, ack 1, win 229, options [nop,nop,TS val 1854390604 ecr 3541047347], length 94
08:45:24.265347 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [.], ack 95, win 210, options [nop,nop,TS val 3541047409 ecr 1854390604], length 0
08:45:24.267156 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [P.], seq 1:80, ack 95, win 210, options [nop,nop,TS val 3541047411 ecr 1854390604], length 79
08:45:24.307676 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 80, win 229, options [nop,nop,TS val 1854390647 ecr 3541047411], length 0
08:45:24.307786 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [F.], seq 95, ack 80, win 229, options [nop,nop,TS val 1854390647 ecr 3541047411], length 0
08:45:24.307864 IP ES-5.3.2.wap-wsp > source_server.41862: Flags [F.], seq 80, ack 96, win 210, options [nop,nop,TS val 3541047452 ecr 1854390647], length 0
08:45:24.364514 IP source_server.41862 > ES-5.3.2.wap-wsp: Flags [.], ack 81, win 229, options [nop,nop,TS val 1854390703 ecr 3541047452], length 0
```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 14, 2017, 8:17am UTC](https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321/2 "2017-06-14T08:17:23Z")

</div>

Hey,

I remember issues with curl and `-X HEAD` and connection keep alive when I played with it.. can you try `--head` instead?

Can you also explain what you mean with "this works" - where is the difference between those two requests when you issued them?

Thanks!

--Alex

---

<div class="post-metadata">

**Author:** ![dwjvaughan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dwjvaughan/32/10648_2.png) [@dwjvaughan](https://discuss.elastic.co/u/dwjvaughan)\
**Post date:** [June 14, 2017, 8:27am UTC](https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321/3 "2017-06-14T08:27:23Z")

</div>

Aha! That works! Thank you.

By works, I mean that it returns `200` whereas before it would just hang and return nothing. The first block was to a 5.4.1 instance, the second to 5.3.2. I'll update my scripts to use `curl --head`

Edit: looking back at the release notes, it seems there were changes to the way HEAD requests are handled which may explain the difference from 5.3.2 \> 5.4.1

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 12, 2017, 8:27am UTC](https://discuss.elastic.co/t/head-no-longer-works-in-5-4-1/89321/4 "2017-07-12T08:27:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
