Date: Fri, 25 May 2001 23:32:05 -0700 (PDT) From: arun@sharmas.dhs.org To: freebsd-gnats-submit@freebsd.org Subject: docs/27653: Updates to send-pr.html to support MIME Message-ID: <200105260632.f4Q6W5F00597@sharmas.dhs.org>
next in thread | raw e-mail | index | archive | help
>Number: 27653 >Category: docs >Synopsis: Updates to send-pr.html to support MIME >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 25 23:40:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Arun Sharma >Release: 5.0-current >Organization: >Environment: >Description: The current web interface to submit PRs doesn't support patches very well. The attached patch adds that feature. People can now send patches easily using a web based interface. >How-To-Repeat: >Fix: Apply the attached patch. Installed the following additional ports: $ pkg_info -xI p5 p5-IO-String-1.01_1 Simplified Perl5 module to handle I/O on in-core strings p5-IO-stringy-1.220 Perl5 module for using IO handles with non-file objects p5-MIME-Base64-2.12 Perl5 module for Base64 and Quoted-Printable encodings p5-MIME-Tools-5.410 A set of perl5 modules for MIME p5-Mail-Tools-1.15 Perl5 modules for dealing with Internet e-mail messages p5-Net-1.0703 Perl5 modules to access and use network protocols ------------=_990858724-596-0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: text/plain +++ dosendpr.cgi 2001/05/26 06:23:57 # (http://www.gnu.ai.mit.edu/copyleft/gpl.html) # $FreeBSD: www/en/cgi/dosendpr.cgi,v 1.5 2001/05/07 19:28:09 wosch Exp $ +# MIME support: Arun Sharma <arun@sharmas.dhs.org> require "html.pl"; +# Requires p5-MIME-Tools port +use MIME::Entity; + &html_title ("Problem Report Error"); @@ -23,9 +30,11 @@ -&cgi_form_in(); + +$gndb = $query->param('gndb'); { require "$gndb.def"; } @@ -52,8 +61,8 @@ -if (!$cgi_data{'email'} || !$cgi_data{'originator'} || +if (!$query->param('email') || !$query->param('originator') || if ($gnsprepbad && -e $gnsprepbad ) else { } # Build the PR. - "From: $cgi_data{'email'}\n" . - "X-Send-Pr-Version: www-1.0\n\n" . - ">Originator:\t$cgi_data{'originator'}\n" . - ">Confidential:\t$cgi_data{'confidential'}\n" . - ">Severity:\t$cgi_data{'severity'}\n" . - ">Category:\t$cgi_data{'category'}\n" . - ">Release:\t$cgi_data{'release'}\n" . - ">Description:\n$cgi_data{'description'}\n" . - ">Fix:\n$cgi_data{'fix'}\n"; + "From: " . $query->param('email') . "\n" . + "X-Send-Pr-Version: www-1.0\n\n"; +$body = ">Submitter-Id:\t" . $query->param('submitterid') . "\n" . + ">Organization:\t" . $query->param('organization') . "\n" . + ">Synopsis:\t" . $query->param('synopsis'). "\n" . + ">Priority:\t" . $query->param('priority'). "\n" . + ">Class:\t\t" . $query->param('class'). "\n" . + ">Environment:\t" . $query->param('environment') . "\n" . + ">How-To-Repeat:\n" . $query->param('howtorepeat') . "\n" . + $pr =~ s/\r//g; +if ($query->param('attachment1') || $query->param('attachment2')) { + $top = MIME::Entity->build( Type => "multipart/mixed", + -To => $gnemail, + + + while (<$fh>) { + } + if ($query->param('attachment1')) { + Encoding => 'text/plain'); + + while (<$fh>) { + } + # attachment #2 + $top->attach(Data => $data2, + }; + $io = IO::String->new($pr); +} #print "<PRE>$submitprog\n\n$pr\n</PRE>"; +++ send-pr.html Thu May 24 09:41:27 2001 you fill in the "Environment" field as requested with the output from + <FORM ACTION="http://sharmas.dhs.org:81/cgi-bin/dosendpr.cgi" METHOD="POST" ENCTYPE="multipart/form-data"> <INPUT TYPE="HIDDEN" NAME="submitterid" VALUE="net"> <B>Fix to the problem if known</B>: <BR> + <INPUT TYPE="FILE" NAME="attachment1"> <BR> + <P> <INPUT TYPE="SUBMIT" VALUE="Submit Problem Report"> + - form should not be used to submit code as plain text.</P> <HR NOSHADE> ------------=_990858724-596-0-- >Release-Note: >Audit-Trail: >Unformatted: This is a multi-part message in MIME format... ------------=_990858724-596-0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: binary To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105260632.f4Q6W5F00597>