Skip to content

problem when parsing the the header of the bodies #1

@bacem86

Description

@bacem86

i'am using osip in an ios application and, I found an issue in osip_body_parse_header, when the server is linux OS.

The problem is in Linux OS, the return key is represented by \n and in other systems like windows is represented by \r\n.

For example:

1- if the body is in this format "content-type:application/json\r\n{content:"ok"}"
The parsing result is:

  • content-type= application/json
    • json dictionary = {content:"ok"}

2- if the body is in this format "content-type:application/json\n{content:"ok"}"

  • content-type= application/jso
  • json dictionary = {content:"ok"}

in the second example we have a missed character.

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