<div dir="ltr">that all makes sense<div><br></div><div>-M<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 4:25 PM, Karel Piwko <span dir="ltr"><<a href="mailto:kpiwko@redhat.com" target="_blank">kpiwko@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sounds reasonable. Let's call it enablement of more strict clients in next<br>
iteration. Meanwhile, I think specs should be updated to say clients require to<br>
set Content-Type to "application/json", do you agree?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, 15 Aug 2013 16:21:37 +0200<br>
Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>> wrote:<br>
<br>
> This works fine (see: no payload):<br>
> curl -3 -v -b cookies.txt -c cookies.txt -v -H "Accept: application/json"<br>
> -H "Content-type: application/json" -X DELETE<br>
> <a href="https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6" target="_blank">https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6</a><br>
><br>
><br>
> Here I do get a 415:<br>
> curl -3 -v -b cookies.txt -c cookies.txt -v -H "Accept: application/json"<br>
> -X DELETE<br>
> <a href="https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6" target="_blank">https://https-pushee.rhcloud.com/rest/applications/e952017a-9d6c-4716-8802-235ed6178fd6</a><br>
><br>
><br>
> Let's fix that for the next iteration<br>
><br>
><br>
><br>
><br>
><br>
> On Thu, Aug 15, 2013 at 4:17 PM, Karel Piwko <<a href="mailto:kpiwko@redhat.com">kpiwko@redhat.com</a>> wrote:<br>
><br>
> > Yes, there should be no payload, hence no Content-Type header for DELETE.<br>
> > Some<br>
> > clients ignore Content-Type if they construct DELETE requests, which is<br>
> > apparently not curl case.<br>
> ><br>
> > I've updated the JIRA with more details. The endpoint I'm speaking about<br>
> > is /rest/applications/${pushAppId}, but most of @DELETE endpoints are<br>
> > affected<br>
> > by requiring content type or content type and payload.<br>
> ><br>
> ><br>
> > On Thu, 15 Aug 2013 09:04:00 -0500<br>
> > Kris Borchers <<a href="mailto:kris@redhat.com">kris@redhat.com</a>> wrote:<br>
> ><br>
> > ><br>
> > > On Aug 15, 2013, at 9:01 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>><br>
> > wrote:<br>
> > ><br>
> > > > Kris - I guess this is the 'problem':<br>
> > > ><br>
> > > ><br>
> > <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L193" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L193</a><br>
> > > ><br>
> > > > I always did CURL DELETE, but I NEVER gave payload with it ....<br>
> > but.......<br>
> > > > (my bad?) I did always include this:<br>
> > > ><br>
> > > > curl -v -b cookies.txt -c cookies.txt -v -H "Accept: application/json"<br>
> > -H<br>
> > > > "Content-type: application/json" -X DELETE<br>
> > ><br>
> > > Oh, yeah if you're referring to the Content-type that should not be<br>
> > required<br>
> > > for DELETE<br>
> > > > .........<br>
> > > ><br>
> > > ><br>
> > > > On Thu, Aug 15, 2013 at 3:59 PM, Kris Borchers <<a href="mailto:kris@redhat.com">kris@redhat.com</a>><br>
> > wrote:<br>
> > > > Yeah, I assumed this was an actual problem but don't see any reference<br>
> > to<br>
> > > > our spec or code where we require a body for DELETE. Karel, can you add<br>
> > > > that to the JIRA or at least clarify what actual issue you have run<br>
> > into?<br>
> > > ><br>
> > > > On Aug 15, 2013, at 8:54 AM, Matthias Wessendorf <<a href="mailto:matzew@apache.org">matzew@apache.org</a>><br>
> > wrote:<br>
> > > ><br>
> > > >> Hello,<br>
> > > >><br>
> > > >> We have "@Delete APIs" that are used by the devices/client (for<br>
> > > >> unregistrations), but that does not require any data: ==><br>
> > > >><br>
> > <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L117-L122" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/installations/InstallationRegistrationEndpoint.java#L117-L122</a><br>
> > > >> It only reads the /token from the URL and the headers (for basic)<br>
> > > >><br>
> > > >> We have other endpoints that are used by the AdminUI, e.g.<br>
> > > >><br>
> > <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L190-L203" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/src/main/java/org/jboss/aerogear/unifiedpush/rest/registry/applications/iOSVariantEndpoint.java#L190-L203</a><br>
> > > >> That also really just reads out of the URL .<br>
> > > >><br>
> > > >><br>
> > > >> I also don't see where the spec, e.g.:<br>
> > > >><br>
> > <a href="http://staging.aerogear.org/docs/specs/aerogear-push-rest/PushApplication/" target="_blank">http://staging.aerogear.org/docs/specs/aerogear-push-rest/PushApplication/</a><br>
> > > >> talk about JSON payload required<br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >> -Matthias<br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >> On Thu, Aug 15, 2013 at 3:35 PM, Karel Piwko <<a href="mailto:kpiwko@redhat.com">kpiwko@redhat.com</a>><br>
> > wrote:<br>
> > > >> Hi All,<br>
> > > >><br>
> > > >> I think that DELETE requests in Push Server do not conform to<br>
> > HTTP/REST<br>
> > > >> specifications because they require request body. More details here:<br>
> > > >><br>
> > > >> <a href="https://issues.jboss.org/browse/AGPUSH-298" target="_blank">https://issues.jboss.org/browse/AGPUSH-298</a><br>
> > > >><br>
> > > >> Should we change them in 0.8.0 release?<br>
> > > >><br>
> > > >> Thanks,<br>
> > > >><br>
> > > >> Karel<br>
> > > >> _______________________________________________<br>
> > > >> aerogear-dev mailing list<br>
> > > >> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > > >> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> > > >><br>
> > > >><br>
> > > >><br>
> > > >> --<br>
> > > >> Matthias Wessendorf<br>
> > > >><br>
> > > >> blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
> > > >> sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
> > > >> twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
> > > >> _______________________________________________<br>
> > > >> aerogear-dev mailing list<br>
> > > >> <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > > >> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> > > ><br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > aerogear-dev mailing list<br>
> > > > <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > > > <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > > Matthias Wessendorf<br>
> > > ><br>
> > > > blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
> > > > sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
> > > > twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
> > > > _______________________________________________<br>
> > > > aerogear-dev mailing list<br>
> > > > <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > > > <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> > ><br>
> ><br>
> > _______________________________________________<br>
> > aerogear-dev mailing list<br>
> > <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
> ><br>
><br>
><br>
><br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div></div>