Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CGI multipart should support nph parameters #6948

Closed
p5pRT opened this issue Nov 22, 2003 · 4 comments
Closed

CGI multipart should support nph parameters #6948

p5pRT opened this issue Nov 22, 2003 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 22, 2003

Migrated from rt.perl.org#24542 (status was 'resolved')

Searchable as RT24542$

@p5pRT
Copy link
Author

p5pRT commented Nov 22, 2003

From sr@stephenreindl.de

Created by sr@stephenreindl.de

This is a bug report for perl from sr@​stephenreindl.de,
generated with the help of perlbug 1.34 running under perl v5.8.1.

-----------------------------------------------------------------
I recognized a problem with a specific solution in Bugzilla
for multipart HTTP responses (see issue

http​://bugzilla.mozilla.org/show_bug.cgi?id=226251

for details.)

The problem is that under some circumstances the nph flag has to be set.

The following patch enables this functionality and makes this depending on
the parameter or the global $NPH variable​:

*** /usr/lib/perl5/5.8.1/CGI.pm~ 2003-10-15 17​:14​:28.000000000 +0200
--- /usr/lib/perl5/5.8.1/CGI.pm 2003-11-22 14​:42​:39.000000000 +0100
***************
*** 1222,1234 ****
  'multipart_init' => <<'END_OF_FUNC',
  sub multipart_init {
  my($self,@​p) = self_or_default(@​_);
! my($boundary,@​other) = rearrange([BOUNDARY],@​p);
  $boundary = $boundary || '------- =_aaaaaaaaaa0';
  $self->{'separator'} = "$CRLF--$boundary$CRLF";
  $self->{'final_separator'} = "$CRLF--$boundary--$CRLF";
  $type = SERVER_PUSH($boundary);
  return $self->header(
! -nph => 1,
  -type => $type,
  (map { split "=", $_, 2 } @​other),
  ) . "WARNING​: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY." . $self->multipart_end;
--- 1222,1234 ----
  'multipart_init' => <<'END_OF_FUNC',
  sub multipart_init {
  my($self,@​p) = self_or_default(@​_);
! my($boundary,$nph,@​other) = rearrange([BOUNDARY,NPH],@​p);
  $boundary = $boundary || '------- =_aaaaaaaaaa0';
  $self->{'separator'} = "$CRLF--$boundary$CRLF";
  $self->{'final_separator'} = "$CRLF--$boundary--$CRLF";
  $type = SERVER_PUSH($boundary);
  return $self->header(
! -nph => $nph||$NPH,
  -type => $type,
  (map { split "=", $_, 2 } @​other),
  ) . "WARNING​: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY." . $self->multipart_end;

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl v5.8.1:

Configured by bhcompile at Wed Oct 15 10:50:03 EDT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.21-2.elsmp, archname=i386-linux-thread-multi
    uname='linux daffy.perf.redhat.com 2.4.21-2.elsmp #1 smp wed sep 17 15:00:55 edt 2003 i686 i686 i386 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 -Dversion=5.8.1 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.1 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dinc_version_list=5.8.0/i386-linux-thread-multi 5.8.0 -Dpager=/usr/bin/less -isr'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.3.1 20030930 (Red Hat Linux 3.3.1-6)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5/5.8.1/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.8.1:
    /usr/lib/perl5/5.8.1/i386-linux-thread-multi
    /usr/lib/perl5/5.8.1
    /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
    /usr/lib/perl5/site_perl/5.8.1
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.1
    /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
    /usr/lib/perl5/vendor_perl/5.8.0
    /usr/lib/perl5/vendor_perl
    /usr/lib/perl5/5.8.1/i386-linux-thread-multi
    /usr/lib/perl5/5.8.1
    .


Environment for perl v5.8.1:
    HOME=/home/sr
    LANG=de_DE.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/home/sr/src/ACE_wrappers/build/g++/ace:/home/sr/src/ACE_wrappers/build/g++/ace:
    LOGDIR (unset)
    PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sr/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 21, 2006

From @smpeters

[sreindl - Sat Nov 22 05​:58​:54 2003]​:

This is a bug report for perl from sr@​stephenreindl.de,
generated with the help of perlbug 1.34 running under perl v5.8.1.

-----------------------------------------------------------------
I recognized a problem with a specific solution in Bugzilla
for multipart HTTP responses (see issue

http​://bugzilla.mozilla.org/show_bug.cgi?id=226251

for details.)

The problem is that under some circumstances the nph flag has to be
set.

The following patch enables this functionality and makes this
depending on
the parameter or the global $NPH variable​:

*** /usr/lib/perl5/5.8.1/CGI.pm~ 2003-10-15 17​:14​:28.000000000
+0200
--- /usr/lib/perl5/5.8.1/CGI.pm 2003-11-22 14​:42​:39.000000000 +0100
***************
*** 1222,1234 ****
'multipart_init' => <<'END_OF_FUNC',
sub multipart_init {
my($self,@​p) = self_or_default(@​_);
! my($boundary,@​other) = rearrange([BOUNDARY],@​p);
$boundary = $boundary || '------- =_aaaaaaaaaa0';
$self->{'separator'} = "$CRLF--$boundary$CRLF";
$self->{'final_separator'} = "$CRLF--$boundary--$CRLF";
$type = SERVER_PUSH($boundary);
return $self->header(
! -nph => 1,
-type => $type,
(map { split "=", $_, 2 } @​other),
) . "WARNING​: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH
TECHNOLOGY." . $self->multipart_end;
--- 1222,1234 ----
'multipart_init' => <<'END_OF_FUNC',
sub multipart_init {
my($self,@​p) = self_or_default(@​_);
! my($boundary,$nph,@​other) = rearrange([BOUNDARY,NPH],@​p);
$boundary = $boundary || '------- =_aaaaaaaaaa0';
$self->{'separator'} = "$CRLF--$boundary$CRLF";
$self->{'final_separator'} = "$CRLF--$boundary--$CRLF";
$type = SERVER_PUSH($boundary);
return $self->header(
! -nph => $nph||$NPH,
-type => $type,
(map { split "=", $_, 2 } @​other),
) . "WARNING​: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH
TECHNOLOGY." . $self->multipart_end;

According to the bugzilla ticket above, this ticket has been resolved
with changes to CGI.pm-3.05.

@p5pRT
Copy link
Author

p5pRT commented May 21, 2006

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 21, 2006

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant