From owner-freebsd-doc Fri May 25 23:40:12 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 163E837B423 for ; Fri, 25 May 2001 23:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4Q6e1h78311; Fri, 25 May 2001 23:40:01 -0700 (PDT) (envelope-from gnats) Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id 41CD737B422 for ; Fri, 25 May 2001 23:39:17 -0700 (PDT) (envelope-from nobody@sharmas.dhs.org) Received: from sharmas.dhs.org (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by albatross.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id XAA26869 for ; Fri, 25 May 2001 23:38:48 -0700 (PDT) Received: (from nobody@localhost) by sharmas.dhs.org (8.11.3/8.11.3) id f4Q6W5F00597; Fri, 25 May 2001 23:32:05 -0700 (PDT) (envelope-from nobody) Message-Id: <200105260632.f4Q6W5F00597@sharmas.dhs.org> 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 Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 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 "
$submitprog\n\n$pr\n
"; +++ send-pr.html Thu May 24 09:41:27 2001 you fill in the "Environment" field as requested with the output from +
Fix to the problem if known:
+
+

+ - form should not be used to submit code as plain text.


------------=_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