0x00d0: 7469 6f6e 2f6a 736f 6e0d 0a55 7365 722d tion/json..User-
0x00e0: 4167 656e 743a 0d0a 436f 6e6e 6563 7469 Agent:..Connecti
Here's your problem.
You have a Header "User-Agent" without a value.
This syntax is only valid in the deprecated RFC2616.
If you want a Header without a value in the current RFC7230 it should be ...
Content-Type: application/json
User-Agent: ""
Connection: close
Fix that, try again.
Either remove the field entirely, or make it's value say double-quote.
Thanks for catching that. I fixed the code to set an actual string there (I just made it “Agent-42”):
08:15:41.251627 IP
pdirks-dev-linux.eng.vmware.com.49710 > pdirks-dev-linux.eng.vmware.com.http-alt: Flags [P.], seq 1:215, ack 1, win 342, options [nop,nop,TS val 3514877737 ecr 3514877737], length
214: HTTP: PUT /VMware-XXX/XXX-backend/1.0/hosts HTTP/1.1
0x0000: 4500 010a c479 4000 4006 2f8e 0a14 98df E....y@.@./.....
0x0010: 0a14 98df c22e 1f90 50f5 eeec 68b1 3876 ........P...h.8v
0x0020: 8018 0156 46e3 0000 0101 080a d180 c729 ...VF..........)
0x0030: d180 c729 5055 5420 2f56 4d77 6172 652d ...)PUT./VMware-
0x0040: 5858 582f 5858 582d 6261 636b 656e 642f XXX/XXX-backend/
0x0050: 312e 302f 686f 7374 7320 4854 5450 2f31 1.0/hosts.HTTP/1
0x0060: 2e31 0d0a 486f 7374 3a20 7064 6972 6b73 .1..Host:.pdirks
0x0070: 2d64 6576 2d6c 696e 7578 2e65 6e67 2e76 -dev-linux.eng.v
0x0080: 6d77 6172 652e 636f 6d3a 3830 3830 0d0a
mware.com:8080..
0x0090: 4163 6365 7074 3a61 7070 6c69 6361 7469 Accept:applicati
0x00a0: 6f6e 2f6a 736f 6e0d 0a43 6f6e 7465 6e74 on/json..Content
0x00b0: 2d4c 656e 6774 683a 3139 0d0a 436f 6e74 -Length:19..Cont
0x00c0: 656e 742d 5479 7065 3a61 7070 6c69 6361 ent-Type:applica
0x00d0: 7469 6f6e 2f6a 736f 6e0d 0a55 7365 722d tion/json..User-
0x00e0: 4167 656e 743a 4167 656e 742d 3432 0d0a Agent:Agent-42..
0x00f0: 436f 6e6e 6563 7469 6f6e 3a20 4b65 6570 Connection:.Keep
0x0100: 2d41 6c69 7665 0d0a 0d0a -Alive....
08:15:41.254157 IP pdirks-dev-linux.eng.vmware.com.http-alt >
pdirks-dev-linux.eng.vmware.com.49710: Flags [P.], seq 1:248, ack 234, win 350, options [nop,nop,TS val 3514877740 ecr 3514877737], length 247: HTTP: HTTP/1.1 400 Bad Request
0x0000: 4500 012b 12ec 4000 4006 e0fa 0a14 98df E..+..@.@.......
0x0010: 0a14 98df 1f90 c22e 68b1 3876 50f5 efd5 ........h.8vP...
0x0020: 8018 015e 4704 0000 0101 080a d180 c72c ...^G..........,
0x0030: d180 c729 4854 5450 2f31 2e31 2034 3030 ...)HTTP/1.1.400
0x0040: 2042 6164 2052 6571 7565 7374 0d0a 4461 .Bad.Request..Da
0x0050: 7465 3a20 4d6f 6e2c 2032 3220 4170 7220 te:.Mon,.22.Apr.
0x0060: 3230 3139 2031 353a 3135 3a34 3120 474d 2019.15:15:
41.GM
0x0070: 540d 0a41 6363 6573 732d 436f 6e74 726f T..Access-Contro
0x0080: 6c2d 416c 6c6f 772d 4f72 6967 696e 3a20 l-Allow-Origin:.
0x0090: 2a0d 0a41 6363 6573 732d 436f 6e74 726f *..Access-Contro
0x00a0: 6c2d 416c 6c6f 772d 4d65 7468 6f64 733a l-Allow-Methods:
0x00b0: 2047 4554 2c20 504f 5354 2c20 4445 4c45 .GET,.POST,.DELE
0x00c0: 5445 2c20 5055 540d 0a41 6363 6573 732d TE,.PUT..Access-
0x00d0: 436f 6e74 726f 6c2d 416c 6c6f 772d 4865 Control-Allow-He
0x00e0: 6164 6572 733a 2043 6f6e 7465 6e74 2d54 aders:.Content-T
0x00f0: 7970 650d 0a43 6f6e 7465 6e74 2d4c 656e ype..Content-Len
0x0100: 6774 683a 2030 0d0a 5365 7276 6572 3a20 gth:.0..Server:.
0x0110: 4a65 7474 7928 392e 332e 3236 2e76 3230 Jetty(9.3.26.v20
0x0120: 3139 3034 3033 290d 0a0d 0a 190403)….
but that didn’t actually make any difference. The server stub still got invoked with a null body immediately: