[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget2 | Content-Length request header missing on empty POST (#691)
From: |
Glenn Strauss (@gstrauss) |
Subject: |
Re: wget2 | Content-Length request header missing on empty POST (#691) |
Date: |
Mon, 13 Jan 2025 17:41:19 +0000 |
Glenn Strauss commented:
https://gitlab.com/gnuwget/wget2/-/issues/691#note_2294599827
RFC9110
> 9.3.3. POST
>The POST method requests that the target resource process the representation
>enclosed in the request according to the resource's own specific semantics.
This documents that POST matches @MortenBroerup quote further above from
RFC9110 that "**A user agent SHOULD send Content-Length in a request when the
method defines a meaning for enclosed content**..."
With a command such as
`wget -d --content-on-error --no-check-certificate --auth-no-challenge -O - -q
--user=REDACTED --password=REDACTED --method=POST --body-file=/dev/null
https://REDACTED/api/sniffer/start`
Wget2 sends `content-type: application/x-www-form-urlencoded`, also clearly
indicating that there is a defined meaning for the body.
Also, please note that an earlier version of wget has been sending
`Content-Length: 0` with POST and empty body since 2014, over 10 years ago:
https://lists.gnu.org/archive/html/bug-wget/2014-10/msg00073.html
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/issues/691#note_2294599827
You're receiving this email because of your account on gitlab.com.