requests-raw icon indicating copy to clipboard operation
requests-raw copied to clipboard

Request with HEAD method not process

Open LTiDi2000 opened this issue 1 year ago • 1 comments

Greetings,

There is an issue while your lib not process the raw requests with HEAD as request method.

Working well with GET/POST/PUT/...:

raw_request = b"GET / HTTP/1.1\r\nHost: google.com\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36\r\nAccept-Encoding: gzip,\
 deflate, br, zstd\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\r\nConnection: keep-alive\r\nAccept-Language: e\
n-US,en;q=0.9\r\n\r\n"
image

Keep pending / no process / no connection with HEAD:

raw_request_head = b"HEAD / HTTP/1.1\r\nHost: google.com\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36\r\nAccept-Encoding:\
 gzip, deflate, br, zstd\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\r\nConnection: keep-alive\r\nAccept-Langu\
age: en-US,en;q=0.9\r\n\r\n"
image

Please help check the issue and fix it!

Thanks and regards

LTiDi2000 avatar Nov 11 '24 06:11 LTiDi2000

Thank you for the example, I will check it out

realgam3 avatar Nov 11 '24 20:11 realgam3