Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 500109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:03:14+00:00 2026-05-13T06:03:14+00:00

A third party is sending us a flat file that is supposed to contain

  • 0

A third party is sending us a flat file that is supposed to contain exclusively printable ASCII characters. However, we’ve discovered that there’s a string of about 50 0x00 bytes in the middle of the file.

We want to be able to upload the file to our web application, but I’ve discovered that Django doesn’t seem to like the null characters in the multipart/form-data. If I remove the null characters, the upload succeeds. (Sorry I don’t have the stack trace available at the moment, but will produce one if necessary)

We can pre-process the file to remove the null characters and/or work with our third party to fix their file generator, but I don’t like to leave mystical problems like this.

Does this sound like a bug in Django or is there some aspect of multipart/form-data that I don’t fully understand? Do I need to set a transfer encoding of some sort so Django doesn’t get hung up on the null characters?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:03:14+00:00Added an answer on May 13, 2026 at 6:03 am

    Nope, no transfer-encoding is needed (or ever used by browsers) on form-data. It’s perfectly valid to include a run of 50 null bytes in a multipart/form-data value… indeed given that most binary files contain a lot of nulls that situation should arise as often as not with file uploads!

    Which makes me question whether it’s really a Django bug, or whether there’s not something else going on. Let’s have that stacktrace!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using a Third-Party assembly that seems to be compiled as AnyCPU. However,
I have a third party server that is periodically sending http post request messages
I have an application that authenticates against a third party web service by sending
I'm using a third party library which has a blocking function, that is, it
Is there any third party tool available which has two richtextboxes but only a
I've got an Oracle 10g database, and I have a third-party jar file(MQ jars).
I have a third party .so that was generated on a 64bit machine. I'd
I have an app that manages a list of third-party servers and can poll
I'm sending requests to a third-party API. It says I must send an HTTP
We have a client that wants to use a third party shopping cart on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.