webfs: send Accept headers

front
cinap_lenrek 2012-06-28 14:32:09 +02:00
parent a82360a8e8
commit 0862bcc93d
1 changed files with 7 additions and 0 deletions

View File

@ -398,6 +398,13 @@ fsopen(Req *r)
if(cl->request[0])
m = cl->request;
/*
* some sites give a 403 Forbidden if we dont include
* a meaningless Accept: */* header in the request.
*/
if(!lookkey(cl->hdr, "Accept"))
cl->hdr = addkey(cl->hdr, "Accept", "*/*");
if(!lookkey(cl->hdr, "Referer")){
char *r;
Url *u;