Reputation: 273
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?
Upvotes: 2
Views: 4869
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
Reputation: 273
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