Skip to content

Wrong "Invalid status message part" #393

@coeyes

Description

@coeyes

If server http response doesn't have textual response code,
cppnet-lib can't parse status code normally.

ex) "Invalid status message part" error

HTTP/1.1 401
...

ex) "OK"

HTTP/1.1 401 Unauthorized
...

"incremental.hpp" should be fixed like

          ... Line 176:
          case http_status_done:
            if (boost::algorithm::is_alnum()(*current)) {
              state_ = http_status_message_char;
              ++current;
            } else if (*current == '\r') {   // <-- ADDED
              state_ = http_status_message_cr; // <-- ADDED
              ++current;  // <-- ADDED
            } else {
              parsed_ok = false;
            }
            break;
          ...

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions