pupnp / pupnp

libupnp: Build UPnP-compliant control points, devices, and bridges on several operating systems.
https://pupnp.github.io/pupnp
BSD 3-Clause "New" or "Revised" License
352 stars 117 forks source link

Normalize HTTP response heades #347

Open ngosang opened 2 years ago

ngosang commented 2 years ago

Gerbera project sent me here: https://github.com/gerbera/gerbera/issues/2229

If I make a request to the Web UI using cURL or Firefox, some of the headers in the response are in upper-case. That is right according to the HTTP RFC because the headers are case-intensive. This issue has low priority. Said that, almost all HTTP servers return the headers with capital-case. You have specs here => https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

 curl -vvv http://192.168.1.191:49494/
*   Trying 192.168.1.191:49494...
* Connected to 192.168.1.191 (192.168.1.191) port 49494 (#0)
> GET / HTTP/1.1
> Host: 192.168.1.191:49494
> User-Agent: curl/7.80.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< CONTENT-LENGTH: 25834
< Accept-Ranges: bytes
< CONTENT-TYPE: text/html
< DATE: Sun, 21 Nov 2021 17:47:14 GMT
< LAST-MODIFIED: Sat, 13 Nov 2021 13:07:40 GMT
< SERVER: Linux/5.10.63-v7l+, UPnP/1.0, Portable SDK for UPnP devices/17.7.0
< X-User-Agent: redsonic
< CONNECTION: close