From owner-freebsd-doc Sat May 26 0:30:19 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 DB1D637B423
for ; Sat, 26 May 2001 00:30:04 -0700 (PDT)
(envelope-from gnats@FreeBSD.org)
Received: (from gnats@localhost)
by freefall.freebsd.org (8.11.1/8.11.1) id f4Q7U4b84022;
Sat, 26 May 2001 00:30:04 -0700 (PDT)
(envelope-from gnats)
Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22])
by hub.freebsd.org (Postfix) with ESMTP id 829E137B423
for ; Sat, 26 May 2001 00:27:53 -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 hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id AAA18917
for ; Sat, 26 May 2001 00:28:04 -0700 (PDT)
Received: (from nobody@localhost)
by sharmas.dhs.org (8.11.3/8.11.3) id f4Q7KkV01069;
Sat, 26 May 2001 00:20:46 -0700 (PDT)
(envelope-from nobody)
Message-Id: <200105260720.f4Q7KkV01069@sharmas.dhs.org>
Date: Sat, 26 May 2001 00:20:46 -0700 (PDT)
From: arun@sharmas.dhs.org
To: freebsd-gnats-submit@freebsd.org
Subject: docs/27654: Update to PR 27653
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: 27654
>Category: docs
>Synopsis: Update to PR 27653
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 26 00:30:04 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Arun Sharma
>Release: 5.0 current
>Organization:
>Environment:
>Description:
The patch attached in PR 27653 was corrupted due to a bug in
the patch itself.
>How-To-Repeat:
Use the attached patch. If it applies cleanly, it proves that
the patch works.
>Fix:
------------=_990861646-1068-0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: text/plain
--- dosendpr.cgi 2001/05/24 04:21:13 1.1
+++ dosendpr.cgi 2001/05/26 07:17:12
@@ -9,9 +9,16 @@
# (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 CGI qw(:standard);
+use MIME::Entity;
+use IO::String;
+
sub prerror {
&html_title ("Problem Report Error");
&html_body();
@@ -23,9 +30,11 @@
}
&www_content ("text","html");
-&cgi_form_in();
+#&cgi_form_in();
+
+$query = CGI::new;
-$gndb = $cgi_data{'gndb'};
+$gndb = $query->param('gndb');
if ($gndb =~ /^[a-z]+$/ && -e "$gndb.def")
{ require "$gndb.def"; }
else
@@ -52,8 +61,8 @@
&html_body ($gnsprepbody);
# Verify the data ...
-if (!$cgi_data{'email'} || !$cgi_data{'originator'} ||
- !$cgi_data{'synopsis'}) {
+if (!$query->param('email') || !$query->param('originator') ||
+ !$query->param('synopsis')) {
if ($gnsprepbad && -e $gnsprepbad )
{ print `cat $gnsprepbad`; }
else {
@@ -68,27 +77,67 @@
}
# Build the PR.
-$pr = "To: $gnemail\n" .
- "From: $cgi_data{'email'}\n" .
- "Subject: $cgi_data{'synopsis'}\n" .
- "X-Send-Pr-Version: www-1.0\n\n" .
- ">Submitter-Id:\t$cgi_data{'submitterid'}\n" .
- ">Originator:\t$cgi_data{'originator'}\n" .
- ">Organization:\t$cgi_data{'organization'}\n" .
- ">Confidential:\t$cgi_data{'confidential'}\n" .
- ">Synopsis:\t$cgi_data{'synopsis'}\n" .
- ">Severity:\t$cgi_data{'severity'}\n" .
- ">Priority:\t$cgi_data{'priority'}\n" .
- ">Category:\t$cgi_data{'category'}\n" .
- ">Class:\t\t$cgi_data{'class'}\n" .
- ">Release:\t$cgi_data{'release'}\n" .
- ">Environment:\t$cgi_data{'environment'}\n" .
- ">Description:\n$cgi_data{'description'}\n" .
- ">How-To-Repeat:\n$cgi_data{'howtorepeat'}\n" .
- ">Fix:\n$cgi_data{'fix'}\n";
+$head = "To: " . $gnemail . "\n" .
+ "From: " . $query->param('email') . "\n" .
+ "Subject: " . $query->param('synopsis') . "\n" .
+ "X-Send-Pr-Version: www-1.0\n\n";
+
+$body = ">Submitter-Id:\t" . $query->param('submitterid') . "\n" .
+ ">Originator:\t" . $query->param('originator'). "\n" .
+ ">Organization:\t" . $query->param('organization') . "\n" .
+ ">Confidential:\t" . $query->param('confidential') . "\n" .
+ ">Synopsis:\t" . $query->param('synopsis'). "\n" .
+ ">Severity:\t" . $query->param('severity'). "\n" .
+ ">Priority:\t" . $query->param('priority'). "\n" .
+ ">Category:\t" . $query->param('category'). "\n" .
+ ">Class:\t\t" . $query->param('class'). "\n" .
+ ">Release:\t" . $query->param('release'). "\n" .
+ ">Environment:\t" . $query->param('environment') . "\n" .
+ ">Description:\n" . $query->param('description') . "\n" .
+ ">How-To-Repeat:\n" . $query->param('howtorepeat') . "\n" .
+ ">Fix:\n" . $query->param('fix') . "\n";
+
+$pr = $head . $body;
# remove any carrage returns that appear in the report.
$pr =~ s/\r//g;
+
+if ($query->param('attachment1') || $query->param('attachment2')) {
+# we need to construct a MIME message
+ $top = MIME::Entity->build( Type => "multipart/mixed",
+ -From => $query->param('email'),
+ -To => $gnemail,
+ -Subject => $query->param('synopsis'));
+
+ $top->attach(Data=>$body);
+
+ {
+ undef $/;
+ $fh = $query->param('attachment1');
+ $data1 = <$fh>;
+ }
+
+ # attachment #1
+ if (length $data1 > 0) {
+ $top->attach(Data =>$data1,
+ Encoding => 'text/plain');
+ };
+
+ {
+ undef $/;
+ $fh = $query->param('attachment2');
+ $data2 = <$fh>;
+ }
+
+ # attachment #2
+ if (length $data2 > 0) {
+ $top->attach(Data => $data2,
+ Encoding => 'text/plain');
+ };
+
+ $io = IO::String->new($pr);
+ $top->print($io);
+}
#print "$submitprog\n\n$pr\n
";
if (open (SUBMIT, "|$submitprog")){
------------=_990861646-1068-0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: text/plain
--- send-pr.html.orig Fri May 25 23:25:50 2001
+++ send-pr.html Thu May 24 09:41:27 2001
@@ -28,7 +28,8 @@
you fill in the "Environment" field as requested with the output from
the machine on which problem occurred.
-
- Note: copy/paste will destroy TABs and spacing, and this web
- form should not be used to submit code as plain text.
freebsd-questions@FreeBSD.ORG
------------=_990861646-1068-0--
>Release-Note:
>Audit-Trail:
>Unformatted:
This is a multi-part message in MIME format...
------------=_990861646-1068-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