php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68875 LINK http method not implemented
Submitted: 2015-01-21 11:39 UTC Modified: 2016-12-06 15:13 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: pedroresende at mail dot resende dot biz Assigned:
Status: Re-Opened Package: Built-in web server
PHP Version: Irrelevant OS: Ubuntu 14.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pedroresende at mail dot resende dot biz
New email:
PHP Version: OS:

 

 [2015-01-21 11:39 UTC] pedroresende at mail dot resende dot biz
Description:
------------
Apparently the php built-in web server hasn't LINK method implemented

Test script:
---------------
php -S localhost:8001

curl -i -X LINK http://localhost:8001/

Actual result:
--------------
HTTP/1.1 501 Not Implemented
Host: localhost:8001
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 495

<!doctype html><html><head><title>501 Not Implemented</title><style>
body { background-color: #fcfcfc; color: #333333; margin: 0; padding:0; }
h1 { font-size: 1.5em; font-weight: normal; background-color: #9999cc; min-height:2em; line-height:2em; border-bottom: 1px inset black; margin: 0; }
h1, p { padding-left: 10px; }
code.url { background-color: #eeeeee; font-family:monospace; padding:0 2px;}
</style>
</head><body><h1>Not Implemented</h1><p>Request method not supported.</p></body></html>%       

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-21 12:04 UTC] requinix@php.net
-Type: Bug +Type: Feature/Change Request
 [2015-01-21 13:05 UTC] leigh@php.net
The LINK and UNLINK methods are draft status, subject to change and/or not being accepted as a specification at all.

https://tools.ietf.org/html/draft-snell-link-method-11

I don't think it is a good idea to introduce verbs that may not ever be accepted or widely used into the test server.
 [2015-09-05 11:54 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2015-09-05 11:54 UTC] cmb@php.net
> I don't think it is a good idea to introduce verbs that may not
> ever be accepted or widely used into the test server.

I fully agree. Therefore I'm suspending this request.
 [2016-03-26 14:54 UTC] sebastien dot houze at gmail dot com
Guys, don't we need to move forward?

LINK/UNLINK is a draft but I can attest that many people already use it. The usage drives everything & BTW it's just a debate about an HTTP verb, nothing more!

In fact, php is using nodejs http-parser https://github.com/nodejs/http-parser code.

And guess what... nodejs http-parser code has adopted LINK/UNLINK support since few months!
https://github.com/nodejs/http-parser/commit/e557b62744e4f487a303b25b27c56947d7a8bacc

Maybe it's time to backport that in php source?

I can make the pull request and everything needed to have this pull request merged. Furthermore it could be backported to every actively supported php version.
 [2016-07-05 18:34 UTC] cmb@php.net
-Status: Suspended +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-07-05 18:34 UTC] cmb@php.net
> LINK/UNLINK is a draft […]

The latest respective draft which I could find is "HTTP Link and
Unlink Methods|draft-snell-link-method-12"[1], which has been
expired on March 24, 2016. Can you point to a more recent RFC?

> The usage drives everything & BTW it's just a debate about an
> HTTP verb, nothing more!

If it is nothing more, we should consider to accept *all*
potentially allowable verbs. That would also simplify the parser.

[1] <https://tools.ietf.org/html/draft-snell-link-method-12>
 [2016-07-17 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-11-30 08:55 UTC] arielferrandini at gmail dot com
Same happens with method PURGE

Test script:
------------
php -S localhost:8001

curl -i -X PURGE http://localhost:8001/

Result:
-------

HTTP/1.1 501 Not Implemented
Host: localhost:8001
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 495

<!doctype html><html><head><title>501 Not Implemented</title><style>
body { background-color: #fcfcfc; color: #333333; margin: 0; padding:0; }
h1 { font-size: 1.5em; font-weight: normal; background-color: #9999cc; min-height:2em; line-height:2em; border-bottom: 1px inset black; margin: 0; }
h1, p { padding-left: 10px; }
code.url { background-color: #eeeeee; font-family:monospace; padding:0 2px;}
</style>
</head><body><h1>Not Implemented</h1><p>Request method not supported.</p></body></html>
 [2016-11-30 11:21 UTC] cmb@php.net
-Status: No Feedback +Status: Re-Opened
 [2016-12-06 15:13 UTC] cmb@php.net
-Assigned To: cmb +Assigned To:
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Oct 16 16:01:26 2018 UTC