# binpac: HTTP parsing failing and exception thrown

**URL:** <https://community.zeek.org/t/binpac-http-parsing-failing-and-exception-thrown/6401>\
**Category:** Zeek\
**Created:** [August 23, 2021, 7:06am UTC](https://community.zeek.org/t/binpac-http-parsing-failing-and-exception-thrown/6401 "2021-08-23T07:06:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harish\_Patil](https://avatars.discourse-cdn.com/v4/letter/h/4da419/32.png) [@Harish\_Patil](https://community.zeek.org/u/Harish_Patil)\
**Post date:** [August 23, 2021, 7:06am UTC](https://community.zeek.org/t/binpac-http-parsing-failing-and-exception-thrown/6401/1 "2021-08-23T07:06:44Z")

</div>

Hi,

I have a bunch of .pac files that we used over the years without any  
changes for HTTP parsing and no issues.

binpac-lib.pac binpac.pac http-analyzer.pac http.pac http-protocol.pac

However, the HTTP parsing is failing in our recent release and hitting  
this exception:

if ( t\_anonymous\_field\_005\_string\_length \< 0 )  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw  
binpac::ExceptionStringMismatch("cheetah/binpac/pac/http-protocol.pac:56",  
"[\\t]\*", string((const char \*) (t\_dataptr\_after\_uri), (const char \*)  
t\_end\_of\_data).c\_str());  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

I have verified the input fed to the parser routines is exactly the  
same as before which always works in the previous release. The binpac  
version has not changed either. There are other things which binpac  
depends on and those might have changed (like bison or flex) and gcc  
versions etc.

Could you pls provide me with any inputs here? If you need more  
details please let me know.

Thanks,  
Harish

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:47pm UTC](https://community.zeek.org/t/binpac-http-parsing-failing-and-exception-thrown/6401/2 "2022-05-06T15:47:45Z")

</div>


