Earlier this morning White 0rchid came into #esi on tweetfleet slack with the following error message.
"Message": "<html>\n <head>\n <title>Bad Request<\/title>\n <\/head>\n <body>\n <h1><p>Bad Request<\/p><\/h1>\n Error parsing headers: 'limit request headers fields size'\n <\/body>\n<\/html>\n"
According to White 0rchid this error occurred after about 12 hours of use.
A quick test, shows that each this this line is called it appends the eTag to the header instead of overwriting.
https://i.imgur.com/tL3sU9G.png
If client.DefaultRequestHeaders.Remove("If-None-Match"); was added before the add then this would prevent this happening.
The remove can be called every time as this does not cause an issue if what it is trying to remove does not exist.
https://i.imgur.com/b4SMUkD.png
This may not be the cause of this error and I have only been able to look at your code on Github, but I hope this helps.
Earlier this morning White 0rchid came into #esi on tweetfleet slack with the following error message.
"Message": "<html>\n <head>\n <title>Bad Request<\/title>\n <\/head>\n <body>\n <h1><p>Bad Request<\/p><\/h1>\n Error parsing headers: 'limit request headers fields size'\n <\/body>\n<\/html>\n"
According to White 0rchid this error occurred after about 12 hours of use.I had a quick look and I may be wrong but it seems like
https://github.com/seraphx2/ESI.NET/blob/b1b0ee59f64d128e7e51d4c3826fb12e554e1d82/ESI.NET/EsiRequest.cs#L38 Is causing the issue.
A quick test, shows that each this this line is called it appends the eTag to the header instead of overwriting. https://i.imgur.com/tL3sU9G.png
If
client.DefaultRequestHeaders.Remove("If-None-Match");
was added before the add then this would prevent this happening. The remove can be called every time as this does not cause an issue if what it is trying to remove does not exist. https://i.imgur.com/b4SMUkD.pngThis may not be the cause of this error and I have only been able to look at your code on Github, but I hope this helps.