user324747
user324747

Reputation: 273

How to send request with null user agent?

In my webapp I am getting key errors for requests with no user agent.

How can I make a request with no user agent to debug and test this?

enter image description here

enter image description here

Upvotes: 2

Views: 4869

Answers (2)

Travis
Travis

Reputation: 14476

curl -H "User-Agent:" example.com

That will overwrite the default user agent sent by curl and instead show as null on the server.

Upvotes: 0

user324747
user324747

Reputation: 273

https://security.stackexchange.com/questions/48223/how-to-send-get-post-requests-without-header-and-agent-information

nc example.com 80 << http_message_file

Did not load the request in the file, rather let me type it using a here DOC.

cat http_message_file | nc example.com 80

Did the trick

Upvotes: 2

Related Questions