I’m using httplib and django. When I do the following:
conn.request("PUT", "/udj/users/3/library/songs", headers={"X-Udj-Ticket-Hash" : hash,
"content-type" : "text/json"}, body='{"blah": 2}')
My server then reports that no header by the name of X-Udj-Ticket-Hash was sent. Instead, it shows that a header by the name of HTTP_X_UDJ_TICKET_HASH was sent. Why is my header name getting modified? Is django doing this, or is the issue on the client side?
Figured it out, the issue is with django. From the documentation here:
I really don’t like this. Does anyone know why this is done?