Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Grivus's avatar
Grivus
Explorer | Level 3
9 years ago
Solved

No error message with line feed in json header

Hello!   During using API I found weird behaviour of dropbox: when sending the new upload request (v2), if there is a 0xA (line feed) character in the end of Dropbox-API-Arg header, server will sen...
  • Greg-DB's avatar
    Greg-DB
    9 years ago
    Thanks! That's helpful.

    It sounds like the issue is that the extra line feed is making its way into the HTTP request itself. When the resulting HTTP request is interpreted, that extra new line is interpreted as separating the headers from the body, causing the unexpected file data.

    I'm not sure if we'll be able to detect and handle that on our side, so do make sure you don't put that in on your side.

    Whatever HTTP client you're using doesn't seem to catch this for you, but some HTTP libraries apparently do. For example, the Python requests library stops you from doing this by throwing a "ValueError: Invalid header value" exception.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!