Accept shar files.
PR: www/113609
This commit is contained in:
parent
6a79bf9903
commit
ac8c88109f
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=30277
2 changed files with 6 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
# GNU General Public License Version 2.
|
||||
# (http://www.gnu.ai.mit.edu/copyleft/gpl.html)
|
||||
#
|
||||
# $FreeBSD: www/en/cgi/dosendpr.cgi,v 1.31 2007/05/23 21:53:45 simon Exp $
|
||||
# $FreeBSD: www/en/cgi/dosendpr.cgi,v 1.32 2007/06/12 06:06:41 ceri Exp $
|
||||
|
||||
use Socket;
|
||||
use CGI qw/:standard/;
|
||||
|
@ -100,10 +100,11 @@ if (!$submission_program) { &prerror("submit program problem"); }
|
|||
|
||||
if ($patchhandle = upload('patch')) {
|
||||
# use bytes;
|
||||
unless (uploadInfo($patchhandle)->{'Content-Type'} =~ m!text/.*!) {
|
||||
unless ((uploadInfo($patchhandle)->{'Content-Type'} =~ m!^text/.*!) ||
|
||||
(uploadInfo($patchhandle)->{'Content-Type'} =~ m!^application/shar$!)) {
|
||||
&piloterror("Patch file has wrong content type: got " .
|
||||
uploadInfo($patchhandle)->{'Content-Type'} .
|
||||
" but was expecting one matching text/.*");
|
||||
" but was expecting one matching text/.* or application/shar");
|
||||
}
|
||||
read($patchhandle,$patchbuf,$maxpatch + 1);
|
||||
if (length($patchbuf) > $maxpatch) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN" [
|
||||
<!ENTITY date "$FreeBSD: www/en/send-pr.sgml,v 1.55 2006/12/28 09:56:22 joel Exp $">
|
||||
<!ENTITY date "$FreeBSD: www/en/send-pr.sgml,v 1.56 2007/04/03 06:34:19 remko Exp $">
|
||||
<!ENTITY title "Submit a FreeBSD problem report">
|
||||
<!ENTITY copyright "This gnats pr-submission mechanism Copyright © 1996
|
||||
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.">
|
||||
|
@ -48,7 +48,7 @@
|
|||
already have an effective spam filter in place.</p>
|
||||
|
||||
<p>If you are submitting a patch file, note that we only accept
|
||||
text/* content types, and you must therefore ensure that your
|
||||
text/* and application/shar content types, and you must therefore ensure that your
|
||||
browser sends the correct type. If your browser does not like
|
||||
to do this, a good way to convince it to do so is to ensure that
|
||||
the file name ends with the string '.txt'.</p>
|
||||
|
|
Loading…
Reference in a new issue