www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Httparsed - fast native dlang HTTP 1.x message header parser

reply test123 <test123 gmail.com> writes:
https://forum.dlang.org/post/odlataafslwqvsgsmevg forum.dlang.org

On Monday, 14 December 2020 at 21:59:02 UTC, tchaloupka wrote:
 Hi,
 I was missing some commonly usable HTTP parser on 
 code.dlang.org and after some research and work I've published 
 httparsed[1].

 [1] https://code.dlang.org/packages/httparsed
 [2] https://github.com/h2o/picohttpparser
 [3] https://i.imgur.com/iRCDGVo.png
 [4] https://github.com/nodejs/http-parser
 [5] 
 https://github.com/adamdruppe/arsd/blob/402ea062b81197410b05df7f75c299e5e3eef0d8/cgi.d#L1737
 [6] 
 https://github.com/tchaloupka/httparsed/blob/230ba9a4a280ba91267a22e97137be12269b5574/bench/bench.d#L194
Thanks for the great work. Maybe we can add the picohttpparser test case into httparsed. I try use this project, but it has error results when parse some header files. I has to add this into nginx to avoid the error: ```sh proxy_set_header Sec-Fetch-User ""; proxy_set_header Sec-Ch-Ua-Mobile ""; proxy_set_header Sec-Ch-Ua ""; ```
May 27 2022
parent tchaloupka <chalucha gmail.com> writes:
On Saturday, 28 May 2022 at 05:37:06 UTC, test123 wrote:
 Maybe we can add the picohttpparser test case into httparsed.
Hi, it is actually [there](https://github.com/tchaloupka/httparsed/blob/e07906e61b7c0b5123ecec4ea6a578b1768c47da/sourc /httparsed.d#L669), probably not exactly everything, but mostly is.
 I try use this project, but it has error results when parse 
 some header files.

 I has to add this into nginx to avoid the error:


 ```sh
   proxy_set_header Sec-Fetch-User "";
   proxy_set_header Sec-Ch-Ua-Mobile "";
   proxy_set_header Sec-Ch-Ua "";
 ```
Please file the issue directly to the [repository](https://github.com/tchaloupka/httparsed) ideally with a problematic real header so I can add it to the tests and see whats wrong. As this doesn't belong to the announce forum much ;-) Thx
May 28 2022