php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79610 HTTP PUT description inadequate
Submitted: 2020-05-18 08:16 UTC Modified: 2020-05-18 14:07 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: denk at us dot es Assigned:
Status: Open Package: *General Issues
PHP Version: 7.4.6 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-05-18 08:16 UTC] denk at us dot es
Description:
------------
---
From manual page: https://php.net/features.file-upload.put-method
---
The manual page states:

PHP provides support for the HTTP PUT method used by some clients to store files on a server. PUT requests are much simpler than a file upload using POST requests and they look something like this: ....

This is certainly not close to the PUT definition for HTTP and restricts the usage of PUT to a very special case. I think this should be corrected in the manual.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-18 12:26 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2020-05-18 12:26 UTC] requinix@php.net
I don't follow. What's wrong with that page? What would you change?
 [2020-05-18 13:40 UTC] denk at us dot es
-Status: Feedback +Status: Open
 [2020-05-18 13:40 UTC] denk at us dot es
I am sorry I probably did not express this correctly. I'll try again.

This page is in the context of file uploads, but the title is just "PUT method support". If you come here because you googled "php put support" (as I did) you could think you are reading about how "put" is supported in php. Also, this seems to be the only page in the manual talking about PUT.

Maybe there should be some page in the manual about how to use the different HTTP verbs with PHP, having in mind that REST apis usually use GET, PUT, POST and DELETE.

But even without such a page the manual page https://php.net/features.file-upload.put-method could be rewritten along the lines of

Title: PUT method support for file uploads

For file uploads, some clients use the HTTP PUT (refer to above mentioned "HTTP verbs with PHP" doc) method to upload files with a simple request like this ....

...

I think this manual page should make clearer that it refers to a specific application of PUT to upload a file, but that PUT generally is used to update (or create) a _resource_, which does not have to be a file. If there was a more general page about HTTP verbs with PHP it could link to that page.
 [2020-05-18 14:07 UTC] requinix@php.net
-Package: Documentation problem +Package: *General Issues
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Oct 28 20:01:24 2020 UTC