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 906835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:27:11+00:00 2026-05-15T16:27:11+00:00

In C#, I am working on a project to automatically update a separate server

  • 0

In C#, I am working on a project to automatically update a separate server with an image and other form data and such… However, the PHP server isn’t getting any of the POST data, it’s only getting the headers and I can’t figure out why.

Here is what I am sending to the server (all new lines have CRLF):

POST /new_reply/1 HTTP/1.1
Host: 192.168.1.104
User-Agent: Update Bot
Cookie: SID=sib5m5lgaq66vfp2nfhpab6ug0;UID=bot
Content-Type: multipart/form-data; boundary=-----xxx
Content-Length: 1903

-----xxx
Content-Disposition: form-data; name="form_sent"

1
-----xxx
Content-Disposition: form-data; name="name"


-----xxx
Content-Disposition: form-data; name="body"

hej fra mig
-----xxx
Content-Disposition: form-data; name="image"; filename="test.jpg"
Content-Type: image/jpeg

(image data)
-----xxx
Content-Disposition: form-data; name="post"

Post
-----xxx--

Here is the image with the hidden characters show of the request:

Here is the PHP print_r of $_REQUEST on the page /new_reply/1:

Array
(
    [reply] => 1
    [SID] => sib5m5lgaq66vfp2nfhpab6ug0
    [UID] => bot
)

As you can see, none of the post is coming through…

  • 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-15T16:27:12+00:00Added an answer on May 15, 2026 at 4:27 pm

    I’m pretty sure that the boundary specified in the Content-Type header is wrong. It should be something like this:

    Content-Type: multipart/form-data; boundary=RANDOM_STRING_BOUNDARY
    --RANDOM_STRING_BOUNDARY
    Content-Disposition: form-data; name="image_name"
    
    Monkey
    --RANDOM_STRING_BOUNDARY
    Content-Disposition: form-data; name="photo"; filename="monkey.png"
    Content-Type: image/png
    
    [ here would be the png file in binary form ]
    --RANDOM_STRING_BOUNDARY--
    

    As you can see, RANDOM_STRING_BOUNDARY has no hyphens prepended when specified in the Content-Type header, only in the subsequent headers where it is actually used. Also, the last usage appends two new hyphens (but you already knew that).

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

Sidebar

Related Questions

I'm working on a project that will automatically update my USB with some files
I'm currently working on a Haskell project which automatically tests some functions based on
I working on project and have problem with threading and update of UI. I
I m working on project user to move the image in one position to
I'm working on a project which involves aggregating data from a variety of sources
I am working on a PHP project where I want to be able to
I'm working on trying to have my project automatically build two different versions of
I am working on a project to make a JApplet's contents automatically scale to
Possible Duplicate: Auto refresh eclipse project upon folder update I have been working with
I'm working on a project that needs to automatically load content and insert it

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.