Welcome! Log In Create A New Profile

Advanced

Why nginx's http parser doesnt use regular expressions?

anshuk kumar
June 23, 2013 01:48AM
This is in reference to the following code

https://github.com/joyent/http-parser

What could be the main reason for such a design decision? I guess I could
write few regular expressions to parse HTTP req & res this would be a lot
less complex than Igor's version of the parser.

What am I missing here?


On some discussion with over nginx's IRC i got the following points

* HTTP parsing requires recursive exp resolution which is not possible
using regexp

* State Machines are faster?

* A tool like ragel is used to create such state machine?
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Why nginx's http parser doesnt use regular expressions?

anshuk kumar 1103 June 23, 2013 01:48AM

Re: Why nginx's http parser doesnt use regular expressions?

Maxim Dounin 418 June 24, 2013 06:52AM

Re: Why nginx's http parser doesnt use regular expressions?

anshuk kumar 415 June 25, 2013 12:14AM

Re: Why nginx's http parser doesnt use regular expressions?

Valentin V. Bartenev 431 June 25, 2013 07:06AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 108
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready