Skip to content

Bug in skipHeaders make skipping work only once #12

Closed

Description

@Apollon77

Hi,

I was wondering why the headers were skipped correctly for the very first getURL call, but for all subsequent calls only the "HTTP/1.1 $Statucode" part is removed.
After searching a long time I found the problem:

In "skipHeaders" the both variables inByte und lastByte are declared "static" and first set to 0.
Then it is checked that both variables are not "/n" together.
This is the case for the first run (because they are initialized as 0.
So it works for the first URI.

For the second URI the values are preserved and so are both "/n" initially, so the while loop is never entered ... because of this no header is removed from all subsequent URIs ...

When removing the "static" everything works much better :-)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions