FreeBSD Bugzilla – Attachment 78624 Details for
Bug 113071
[patch] improve query-pr.cgi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.02 KB, created by
edwin
on 2007-05-28 01:40:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
edwin
Created:
2007-05-28 01:40:03 UTC
Size:
2.02 KB
patch
obsolete
>Index: query-pr.cgi >=================================================================== >RCS file: /home/dcvs/www/en/cgi/query-pr.cgi,v >retrieving revision 1.61 >diff -u -r1.61 query-pr.cgi >--- query-pr.cgi 10 Jan 2007 17:47:39 -0000 1.61 >+++ query-pr.cgi 28 May 2007 00:38:23 -0000 >@@ -29,6 +29,13 @@ > # $FreeBSD: www/en/cgi/query-pr.cgi,v 1.61 2007/01/10 17:47:39 danger Exp $ > # > >+# >+# Note: this is a script to run on a webserver. If you want to do tests >+# on the command-line, use the QUERY_STRING environment variable to >+# pass parameters to the script: >+# $ QUERY_STRING=pr=bin/106049 ./query-pr.cgi >+# >+ > use strict; > > use MIME::Base64; # ports/converters/p5-MIME-Base64 >@@ -39,7 +46,7 @@ > require './query-pr-lib.pl'; > > use constant HTTP_HEADER => "Content-type: text/html; charset=UTF-8\r\n\r\n"; >-use constant HTTP_HEADER_PATCH => "Content-type: text/plain; charset=UTF-8\r\n\r\n"; >+use constant HTTP_HEADER_PATCH => "Content-type: text/plain; charset=UTF-8\r\nContent-Disposition: inline; filename=\"%s\"\r\n\r\n"; > > use constant SECT_HEADER => 1; > use constant SECT_SFIELDS => 2; >@@ -149,7 +156,7 @@ > $fmt{'patchblock_thead'} = <<EOF; > <table class="patchblock" cellspacing="0" cellpadding="3"> > <tr class="info"><td> >- <b>Download <a href="${scriptname}?pr=%%(pr)&getpatch=%%(1)">%%(2)</a></b> >+ <b>Download <a href="${scriptname}?prp=%%(pr)-%%(1)">%%(2)</a></b> > </td></tr> > <tr><td class="content"><pre> > EOF >@@ -246,12 +253,19 @@ > $PR = lc $val if ($key eq "pr" or $key eq "q"); > $PR = lc $key if ($key =~ /^(?:$valid_category\/)?$valid_pr$/i); > $category = lc $val if ($key eq "cat"); >- $getpatch = lc $val if ($key eq "getpatch"); >+ >+ if ($key eq "prp") { >+ $PR = lc ($val); >+ $PR =~ s/\-.*$//; >+ $getpatch = lc ($val); >+ $getpatch =~ s/^.*\-//; >+ } > } > } > > unless (!$iscgi) { >- print HTTP_HEADER_PATCH if ($getpatch > 0 or $f eq "raw"); >+ printf HTTP_HEADER_PATCH,"patch-$getpatch.diff" >+ if ($getpatch > 0 or $f eq "raw"); > } > > ($category, $PR) = ($1, $2)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 113071
: 78624 |
78625
|
78626