Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14930

Re: Newby neds help

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: Newby neds help
Date 2015-02-10 00:53 +0100
Organization solani.org
Message-ID <mbbh9d$rq8$1@solani.org> (permalink)
References (4 earlier) <mb7rf4$ajf$1@solani.org> <1839166.EmLIn1UUa8@PointedEars.de> <mb8m1s$emd$1@solani.org> <2569886.EXN0AjEPWQ@PointedEars.de> <18037102.bZD2gyoLk2@PointedEars.de>

Show all headers | View raw


Thomas 'PointedEars' Lahn wrote:

> Thomas 'PointedEars' Lahn wrote:
> 
>> A combination of POST data and URI parameters appears to be appropriate,
>> but it cannot be achieved without client-side DOM scripting if the values
>> of the parameters that are to occur in the URI are to be variable.
> 
> Correction: It can be achieved using POST/Redirect/GET (PRG) and a server-
> side session in which to store the sensitive information.  All parameter 
> values would be in the POST message body, but the URI for the GET request 
> would contain only those that do not constitute sensitive information.

An interesting solution. :)

>     $p =& $_SESSION['POST_data'];
>     $p = [];
>     array_push($p, $_POST);

Wouldn't the following be equivalent?

  $_SESSION['POST_data'] = $_POST;

>     header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other');

I have not been aware of SERVER_PROTOCOL; might come in handy -- thanks.
 However, I'm not sure if it's okay to use it in this case.  AFAIK 303
is only specified for HTTP/1.1, but not for HTTP/1.0.  I still have to
catch up on HTTP/2.0, though.

>     header(
>         "Location: {$SERVER['SCRIPT_NAME']}"

While RFC 7321 specifies that the value of the Location header field is
an URI-reference, RFC 2616 says it must be an absoluteURI.  I had some
problems in the past with older IIS (6?), where a relativeURI was not
properly processed (server-side!).  This might not be relevant anymore,
but still I'd prefer to use an absoluteURI.

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Newby neds help F. George McDuffee <gmcduffee@mcduffee-associates.us> - 2015-02-07 14:38 -0600
  Re: Newby neds help Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-02-07 16:31 -0500
  Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-07 23:30 +0100
  Re: Newby neds help Tim Streater <timstreater@greenbee.net> - 2015-02-07 22:36 +0000
  Re: Newby neds help Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-08 00:06 +0000
    Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-08 01:29 +0100
      Re: Newby neds help Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-07 20:22 -0500
        Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-08 02:33 +0100
          Re: Newby neds help Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-07 20:54 -0500
      Re: Newby neds help Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-08 13:27 +0000
        Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-08 15:22 +0100
          Re: Newby neds help Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-08 21:58 +0100
            Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-08 22:56 +0100
              Re: Newby neds help Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-08 23:36 +0100
                Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-09 00:14 +0100
                Re: Newby neds help Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-09 00:42 +0100
                Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-09 00:58 +0100
                Re: Newby neds help Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-09 00:30 +0100
                Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-10 00:53 +0100
          Re: Newby neds help Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-08 21:46 +0000
            Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-09 00:40 +0100
              Re: Newby neds help Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-09 19:34 +0000
                HTTP (was: Newby neds help) "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-10 02:04 +0100
        Re: Newby neds help F. George McDuffee <gmcduffee@mcduffee-associates.us> - 2015-02-08 20:06 -0600
          Re: Newby neds help Matthew Carter <m@ahungry.com> - 2015-02-08 21:55 -0500
            Re: Newby neds help F. George McDuffee <gmcduffee@mcduffee-associates.us> - 2015-02-09 00:13 -0600
          Re: Newby neds help Tim Streater <timstreater@greenbee.net> - 2015-02-09 09:46 +0000
          Re: Newby neds help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-10 01:14 +0100
    Re: Newby needs help F. George McDuffee <gmcduffee@mcduffee-associates.us> - 2015-02-07 19:29 -0600
      Re: Newby needs help "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-02-08 02:40 +0100
      Re: Newby needs help Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-02-07 21:36 -0500
  Re: Newby neds help Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-07 21:33 -0500
  Re: Newby neds help Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-02-09 20:02 -0500

csiph-web