Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Thanks a lot for pointing out what should have been obvious!, that got me a long way towards my goal. Now I just need to cleanly get rid of the following footer which seems to get appended to my file each time, confusing the XML parsers:

...the response... <!-- my comments... followed by two offending lines. --> Date: Tue, 09 Jul 2002 13:17:37 GMT Server: libwww-perl-daemon/1.21

When I go into HTTP::Daemon and comment out these two lines:

#(from HTTP::Daemon line 563) sub send_basic_header { my $self = shift; return if $self->antique_client; $self->send_status_line(@_); #taken out print $self "Date: ", time2str(time), $CRLF; my $product = $self->daemon->product_tokens; #taken out print $self "Server: $product$CRLF" if $product; }

then the offending footers dissapear. Do you know what these two footer lines do, and should they not be in the header rather than in the footer? I can't find any way to override them other than by removing them from the module.

ps. you had the wrong mime type in your solution (just to be clear about that). The SVG mimetype is image/svg+xml

$c->send_response( "Content-type: image/svg+xml\r\n\r\n". $svg->xmlify());

hackmare.

In reply to Re: Re: Handling XML content with HTTP::Daemon by hackmare
in thread Handling XML content with HTTP::Daemon by hackmare

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-25 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found