On Fri, 18 Mar 2011 23:57:31 -0700
"Enlightenment SVN" <[email protected]> wrote:

> Log:
> more optimizing
> 
> Author:       discomfitor
> Date:         2011-03-18 23:57:31 -0700 (Fri, 18 Mar 2011)
> New Revision: 57889
> Trac:         http://trac.enlightenment.org/e/changeset/57889
> 
> Modified:
>   trunk/PROTO/azy/src/lib/azy_events.c 
> 
> Modified: trunk/PROTO/azy/src/lib/azy_events.c
> ===================================================================
> --- trunk/PROTO/azy/src/lib/azy_events.c      2011-03-19 06:57:29 UTC (rev
> 57888) +++ trunk/PROTO/azy/src/lib/azy_events.c       2011-03-19 06:57:31
> UTC (rev 57889) @@ -330,9 +330,6 @@
>  
>     slen = strlen(s);
>     snprintf((char *)sep, sizeof(sep), "%s%s", s, s);
> -   /* by spec, this is only found between header and content */
> -   if (azy_memstr(r - 1, sep, len - (r - 1 - start), 2 * slen))
> -     net->headers_read = EINA_TRUE;
>  
>     p = start;
>     line_len = r - p;
> @@ -368,10 +365,12 @@
>          if (len < slen)
>            break;
>          p = r + slen;
> -        if (net->headers_read)
> -          /* double separator: STOP */
> -          if (!strncmp((char*)p, s, slen))
> -            break;
> +        /* double separator: STOP */
> +        if (!strncmp((char*)p, s, slen))
> +          {
> +             net->headers_read = EINA_TRUE;
> +             break;
> +          }
>          r = azy_memstr(p, (const unsigned char *)s, len, slen);
>          line_len = r - p;
>          /* FIXME: to be fully 1.1 compliant, lines without a colon
> 
> 
after this commit, http parsing should be substantially faster (though probably
not noticeable unless you're running on a toaster)

-- 
Mike Blumenkrantz
Zentific: NULL pointer dereferences now 50% off!

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to