Doc #77712 [Asn->Csd]: Wrong syntax for WWW-Authenticate header in example #2
| From: | jhdxr@php.net | Date: | Sat, 09 Mar 2019 09:37:16 +0000 |
| Subject: | Doc #77712 [Asn->Csd]: Wrong syntax for WWW-Authenticate header in example #2 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16454@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77712&edit=1
ID: 77712
Updated by: jhdxr@php.net
Reported by: admin at yangdx dot com
Summary: Wrong syntax for WWW-Authenticate header in example
#2
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Translation problem
PHP Version: 7.3.3
Assigned To: jhdxr
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2019-03-09 09:36:40] jhdxr@php.net
Automatic comment from SVN on behalf of jhdxr
Revision: http://svn.php.net/viewvc/?view=revision&revision=346984
Log: sync with en version
remove php 4.x out-of-date contents
fix #77712 Wrong syntax for WWW-Authenticate header in example #2
------------------------------------------------------------------------
[2019-03-09 09:23:45] jhdxr@php.net
sorry, the example in en version is correct. I'm fixing it in zh version.
------------------------------------------------------------------------
[2019-03-09 09:22:14] jhdxr@php.net
The example is used in en version as well so this is not a translation issue, we should fix the all
the docs
------------------------------------------------------------------------
[2019-03-08 17:54:30] admin at yangdx dot com
Description:
------------
---
From manual page: http://php.net/manual/zh/features.http-auth.php
---
On this page, the code for the second example is wrong.
the code:
------------------
header('WWW-Authenticate: Digest realm="'.$realm.
'" qop="auth" nonce="'.uniqid().'"
opaque="'.md5($realm).'"');
------------------
should be:
------------------
header('WWW-Authenticate: Digest realm="'.$realm.
'",qop="auth",nonce="'.uniqid().'",opaque="'.md5($realm).'"');
------------------
Test script:
---------------
if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Digest realm="'.$realm.
'", qop="auth", nonce="'.uniqid().'",
opaque="'.md5($realm).'"');
die('Text to send if user hits Cancel button');
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77712&edit=1