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

  • Home
  • SEARCH
  • 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 6563365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:49:22+00:00 2026-05-25T13:49:22+00:00

I have a server sending me this response. However, using the following code I

  • 0

I have a server sending me this response. However, using the following code I end up with an entity containing no parts and everything between the boundaries (inclusive) as the MIME::Body. Is there something I can do short of implementing my own multipart parser (in general there may be more parts) and scrapping the modules that are supposed to do it for me?

#!/usr/bin/perl

use MIME::Parser;

my $response = <<_EOF;
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: multipart/mixed; boundary="be4dc417ebd640944ab26f033e5ea1ab"

--be4dc417ebd640944ab26f033e5ea1ab
Content-Type: application/json

{"a":"b"}
--be4dc417ebd640944ab26f033e5ea1ab--
_EOF

my $mime_parser = new MIME::Parser;
$mime_parser->tmp_to_core(1);
$mime_parser->output_to_core(1);
my $entity = $mime_parser->parse_data($response);

print "$MIME::Parser::VERSION $^V $^O\n\n";
$entity->print(\*STDOUT);
print "\n\n";
print $entity->parts(0)->bodyhandle->as_string;

Output:

5.502 v5.10.1 MSWin32


--be4dc417ebd640944ab26f033e5ea1ab
Content-Type: application/json

{"a":"b"}
--be4dc417ebd640944ab26f033e5ea1ab--


Can't call method "bodyhandle" on an undefined value at test.pl line 25.
  • 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-25T13:49:23+00:00Added an answer on May 25, 2026 at 1:49 pm

    The HTTP/1.1 200 OK line is not part of the MIME response. Take it out and it works fine.

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

Sidebar

Related Questions

I have a server (SoapUI) answering requests for a WSDL. When sending test requests,
I have a client and server, client sending file to server. When i transfer
I have a piece of javascript executing on a jetty server which is sending
I have a piece of javascript executing on a jetty server which is sending
I am sending emails using c# using SmtpClient. I have to send aproximately one
This is an erlang problem, it seems. I have this code to test the
I have found this site very useful for all my previously faced problems, However
I have a client-server Silverlight application, which is use Socets. I have server appliaction
My requirement is I have server J2EE web application and client J2EE web application.
My server have default php version of 4, so when I run some script

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.