Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Nginx would really like a Content-Length of 0 for any DELETE requests. I'm currently adding the header in ServicesClientConnection::delete(), patch attached.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1959248-support-nginx-delete-add-content-length-5.patch | 742 bytes | mhrabovcin |
#4 | 1959248-support-nginx-delete-add-content-length-4.patch | 834 bytes | jpstrikesback |
Support-nginx-delete-add-content-length.patch | 679 bytes | jpstrikesback | |
Comments
Comment #1
jpstrikesback CreditAttribution: jpstrikesback commentedComment #2
jpstrikesback CreditAttribution: jpstrikesback commentedComment #3
mhrabovcin CreditAttribution: mhrabovcin commentedI'd like to see this as part of REST plugin rather than services client class because this doesn't need to necessary apply on XML-RPC server or other servers.
Comment #4
jpstrikesback CreditAttribution: jpstrikesback commentedGood catch.
Comment #5
jpstrikesback CreditAttribution: jpstrikesback commentedComment #6
mhrabovcin CreditAttribution: mhrabovcin commentedWhat about adding general Content-Length support to Rest plugin?
Comment #7
jpstrikesback CreditAttribution: jpstrikesback commentedI like that, I'll test that and get back here
Comment #8
mhrabovcin CreditAttribution: mhrabovcin commentedDid you tested if fix was working correctly?
Comment #9
jpstrikesback CreditAttribution: jpstrikesback commentedI just tested it and there are a few items:
- $this->data should be $request->data
- $request->data is at least sometimes an empty array (so strlen() breaks things as it throws a warning) (i.e. when doing a DELETE)
The only real issue is the array, which may be only set on DELETE? I don't know offhand.
Comment #10
jpstrikesback CreditAttribution: jpstrikesback commented