Subscription status updates are received but have an empty body

I have been implementing the subscription status updates service that Apple started to offer recently following the specifications described here. I started receiving updates but the received requests are simply empty.


This is a dump of the request captured by Symfony (PHP framework):


Symfony\Component\HttpFoundation\Request Object
(
    [attributes] => Symfony\Component\HttpFoundation\ParameterBag Object
        (
            [parameters:protected] => Array
                (
                    [_controller] => Acme\SubscriptionBundle\Controller\StatusUpdateController::postAction
                    [_route] => acme_subscription_statusupdate
                    [_route_params] => Array
                        (
                        )


                )


        )


    [request] => Symfony\Component\HttpFoundation\ParameterBag Object
        (
            [parameters:protected] => Array
                (
                )


        )


    [query] => Symfony\Component\HttpFoundation\ParameterBag Object
        (
            [parameters:protected] => Array
                (
                )


        )


    [server] => Symfony\Component\HttpFoundation\ServerBag Object
        (
            [parameters:protected] => Array
                (
                    [REDIRECT_SCRIPT_URL] => /statusupdate
                    [REDIRECT_SCRIPT_URI] => https://acme.com/statusupdate
                    [REDIRECT_HTTPS] => on
                    [REDIRECT_SSL_TLS_SNI] => acme.com
                    [REDIRECT_STATUS] => 200
                    [SCRIPT_URL] => /statusupdate
                    [SCRIPT_URI] => https://acme.com/statusupdate
                    [HTTPS] => on
                    [SSL_TLS_SNI] => acme.com
                    [CONTENT_TYPE] => application/json
                    [CONTENT_LENGTH] => 5754
                    [HTTP_HOST] => acme.com
                    [HTTP_CONNECTION] => Keep-Alive
                    [HTTP_USER_AGENT] => Apache-HttpClient/4.5.1 (Java/1.8.0_131)
                    [HTTP_ACCEPT_ENCODING] => gzip,deflate
                    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                    [SERVER_SIGNATURE] => <address>Apache/2.4.10 (Debian) Server at acme.com Port 443</address>


                    [SERVER_SOFTWARE] => Apache/2.4.10 (Debian)
                    [SERVER_NAME] => acme.com
                    [SERVER_ADDR] => 185.27.175.232
                    [SERVER_PORT] => 443
                    [REMOTE_ADDR] => 17.173.84.235
                    [DOCUMENT_ROOT] => /home/acme/web
                    [REQUEST_SCHEME] => https
                    [CONTEXT_PREFIX] =>
                    [CONTEXT_DOCUMENT_ROOT] => /home/acme/web
                    [SERVER_ADMIN] => niels@acme.com
                    [SCRIPT_FILENAME] => /home/acme/web/app.php
                    [REMOTE_PORT] => 45619
                    [REDIRECT_URL] => /statusupdate
                    [GATEWAY_INTERFACE] => CGI/1.1
                    [SERVER_PROTOCOL] => HTTP/1.1
                    [REQUEST_METHOD] => POST
                    [QUERY_STRING] =>
                    [REQUEST_URI] => /statusupdate
                    [SCRIPT_NAME] => /app.php
                    [PHP_SELF] => /app.php
                    [REQUEST_TIME_FLOAT] => 1501745138.361
                    [REQUEST_TIME] => 1501745138
                )


        )


    [files] => Symfony\Component\HttpFoundation\FileBag Object
        (
            [parameters:protected] => Array
                (
                )


        )


    [cookies] => Symfony\Component\HttpFoundation\ParameterBag Object
        (
            [parameters:protected] => Array
                (
                )


        )


    [headers] => Symfony\Component\HttpFoundation\HeaderBag Object
        (
            [headers:protected] => Array
                (
                    [content-type] => Array
                        (
                            [0] => application/json
                        )


                    [content-length] => Array
                        (
                            [0] => 5754
                        )


                    [host] => Array
                        (
                            [0] => acme.com
                        )


                    [connection] => Array
                        (
                            [0] => Keep-Alive
                        )


                    [user-agent] => Array
                        (
                            [0] => Apache-HttpClient/4.5.1 (Java/1.8.0_131)
                        )


                    [accept-encoding] => Array
                        (
                            [0] => gzip,deflate
                        )


                    [x-php-ob-level] => Array
                        (
                            [0] => 1
                        )


                )


            [cacheControl:protected] => Array
                (
                )


        )


    [content:protected] =>
    [languages:protected] =>
    [charsets:protected] =>
    [encodings:protected] =>
    [acceptableContentTypes:protected] =>
    [pathInfo:protected] => /statusupdate
    [requestUri:protected] => /statusupdate
    [baseUrl:protected] =>
    [basePath:protected] =>
    [method:protected] => POST
    [format:protected] =>
    [session:protected] => Symfony\Component\HttpFoundation\Session\Session Object
        (
            [storage:protected] => Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage Object
                (
                    [bags:protected] => Array
                        (
                            [attributes] => Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag Object
                                (
                                    [name:Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag:private] => attributes
                                    [storageKey:Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag:private] => _sf2_attributes
                                    [attributes:protected] => Array
                                        (
                                        )


                                )


                            [flashes] => Symfony\Component\HttpFoundation\Session\Flash\FlashBag Object
                                (
                                    [name:Symfony\Component\HttpFoundation\Session\Flash\FlashBag:private] => flashes
                                    [flashes:Symfony\Component\HttpFoundation\Session\Flash\FlashBag:private] => Array
                                        (
                                        )


                                    [storageKey:Symfony\Component\HttpFoundation\Session\Flash\FlashBag:private] => _sf2_flashes
                                )


                        )


                    [started:protected] =>
                    [closed:protected] =>
                    [saveHandler:protected] => Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy Object
                        (
                            [handler:protected] => Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler Object
                                (
                                )


                            [wrapper:protected] => 1
                            [active:protected] =>
                            [saveHandlerName:protected] => files
                        )


                    [metadataBag:protected] => Symfony\Component\HttpFoundation\Session\Storage\MetadataBag Object
                        (
                            [name:Symfony\Component\HttpFoundation\Session\Storage\MetadataBag:private] => __metadata
                            [storageKey:Symfony\Component\HttpFoundation\Session\Storage\MetadataBag:private] => _sf2_meta
                            [meta:protected] => Array
                                (
                                    [c] => 0
                                    [u] => 0
                                    [l] => 0
                                )


                            [lastUsed:Symfony\Component\HttpFoundation\Session\Storage\MetadataBag:private] =>
                            [updateThreshold:Symfony\Component\HttpFoundation\Session\Storage\MetadataBag:private] => 0
                        )


                )


            [flashName:Symfony\Component\HttpFoundation\Session\Session:private] => flashes
            [attributeName:Symfony\Component\HttpFoundation\Session\Session:private] => attributes
        )


    [locale:protected] =>
    [defaultLocale:protected] => en
)


I have also checked the compability of my service with ATS using the following command:


/usr/bin/nscurl --ats-diagnostics https://acme.com/statusupdate


Getting PASS on all checks.


Either I am missing something or the service from Apple posting the update is not working as expected. The weird thing is that it clearly indicates there should be content as the content-length is 5754.


Thanks.

Answered by nielsmouthaan in 250071022

Weirdly enough, after a day, I started receiving content. All good now.

Accepted Answer

Weirdly enough, after a day, I started receiving content. All good now.

Subscription status updates are received but have an empty body
 
 
Q