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

I have an application that authenticates against a third party web service by sending
I have a third party library that internally constructs and uses the SqlConnection class.
I've encountered multiple third party .Net component-vendors that use a licensing scheme. On an
I have a third-party app that creates HTML-based reports that I need to display.
We're using a third-party middleware product that allows us to write code in an
Say I have a third party Application that does background work, but prints out
I have an third-party applet that requires JRE v1.5_12 to work correctly. THe user
I'm using a third-party library that returns XML that is not valid, because it
I have a third-party product, a terminal emulator, which provides a DLL that can
I have a swf that is being loaded by a third party swf. I

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.