The document's address

Nicholas Shanks <[email protected]> Wed, 21 Nov 2012 14:12:52 +0000
Newsgroups gmane.comp.web.html.general
Message-ID <[email protected]>
--Apple-Mail-6C40946A-1DCC-44D8-8553-BF52502DEFC1
Content-Type: text/plain;
	charset=cp932
Content-Transfer-Encoding: quoted-printable

The definition of the document's address:
http://dev.w3.org/html5/spec/dom.html#the-document's-address
doesn't mention if the Content-Location header should be taken into account.=


For example say when creating a new resource, you present a warning but the r=
esource was created anyway.

POST /collection HTTP/1.1
=81c

HTTP/1.1 201 Created
Location: /collection/1
Content-Location: /collection/1/warnings

<!DOCTYPE HTML>
<p>Your resource was created, but the following conditions were noted. Pleas=
e resolve them if they are not correct:
=81c


followed by a form. If the action of the form is the empty string, should th=
e form be submitted to /collection or /collection/1/warnings ?


Ideologically, the address bar should update to the Content-Location of the r=
esponse body, as that is what is being displayed, and there would be no issu=
e =81\ forms with empty action attributes would submit to  /collection/1/war=
nings =81\ but I believe web browser UAs don't do this at present.

=81\ Nicholas.=

--Apple-Mail-6C40946A-1DCC-44D8-8553-BF52502DEFC1
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div style=3D"-webkit-text-size-adjust: aut=
o; ">The definition of the document's address:</div><div style=3D"-webkit-te=
xt-size-adjust: auto; "><span style=3D"font-family: '.HelveticaNeueUI'; font=
-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-c=
olor: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 1=
92, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.23=
0469); -webkit-text-size-adjust: none; "><a href=3D"http://dev.w3.org/html5/=
spec/dom.html#the-document's-address">http://dev.w3.org/html5/spec/dom.html#=
the-document's-address</a></span></div><div><font face=3D".HelveticaNeueUI">=
<span style=3D"font-size: 15px; line-height: 19px; white-space: nowrap; -web=
kit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fil=
l-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgb=
a(77, 128, 180, 0.230469);">doesn't mention if the Content-Location header s=
hould be taken into account.</span></font></div><div><font face=3D".Helvetic=
aNeueUI"><span style=3D"font-size: 15px; line-height: 19px; white-space: now=
rap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-compos=
ition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-c=
olor: rgba(77, 128, 180, 0.230469);"><br></span></font></div><div><font face=
=3D".HelveticaNeueUI"><span style=3D"font-size: 15px; line-height: 19px; whi=
te-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -=
webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-compos=
ition-frame-color: rgba(77, 128, 180, 0.230469);">For example say when creat=
ing a new resource, you present a warning but the resource was created anywa=
y.</span></font></div><div><font face=3D".HelveticaNeueUI"><span style=3D"fo=
nt-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight=
-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175=
, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0=
.230469);"><br></span></font></div><div><font face=3D".HelveticaNeueUI"><spa=
n style=3D"font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-=
tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-co=
lor: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77=
, 128, 180, 0.230469);">POST /collection HTTP/1.1</span></font></div><div><s=
pan style=3D"font-size: 15px; line-height: 19px; white-space: nowrap; -webki=
t-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-=
color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(=
77, 128, 180, 0.230469);">=E2=80=A6</span></div><div><font face=3D".Helvetic=
aNeueUI"><span style=3D"font-size: 15px; line-height: 19px; white-space: now=
rap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-compos=
ition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-c=
olor: rgba(77, 128, 180, 0.230469);"><br></span></font></div><div><font face=
=3D".HelveticaNeueUI"><span style=3D"font-size: 15px; line-height: 19px; whi=
te-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -=
webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-compos=
ition-frame-color: rgba(77, 128, 180, 0.230469);">HTTP/1.1 201 Created</span=
></font></div><div><font face=3D".HelveticaNeueUI"><span style=3D"font-size:=
 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: r=
gba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 22=
7, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);=
">Location: /collection/1<br></span></font>Content-Location: /collection/1/w=
arnings</div><div><br></div><div>&lt;!DOCTYPE HTML&gt;<br>&lt;p&gt;Your reso=
urce was created, but the following conditions were noted. Please resolve th=
em if they are not correct:</div><div>=E2=80=A6</div><div><br></div><div><br=
></div><div>followed by a form. If the action of the form is the empty strin=
g, should the form be submitted to /collection or /collection/1/warnings ?</=
div><div><br></div><div><br></div><div>Ideologically, the address bar should=
 update to the Content-Location of the response body, as that is what is bei=
ng displayed, and there would be no issue =E2=80=94 forms with empty action a=
ttributes would submit to&nbsp;<span style=3D"-webkit-tap-highlight-color: r=
gba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 22=
7, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);=
 ">&nbsp;/collection/1/warnings =E2=80=94 but I believe web browser UAs don'=
t do this at present.</span></div><div><br><span style=3D"-webkit-text-size-=
adjust: auto;">=E2=80=94 Nicholas.</span></div></body></html>=

--Apple-Mail-6C40946A-1DCC-44D8-8553-BF52502DEFC1--