Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
how to interpret content-length for XHR requests?

I want to track progress for uploading a large file which I'm chunking on the client using XHR. On my server, I take some data out of the form and persist N bytes to disk. What I'm confused about is that if I don't return the exact value that the client sent, it gets a content-length mismatch error. How does this make sense?

I send a form, with say 100 bytes and 80 of the bytes are the data I write to disk. Once I write the 80 bytes to disk, the server returns 80 for the content-length header. Why does the browser assume that I should write the same amount of bytes I sent?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!