Skip to content

Commit a703408

Browse files
No need to include Content-Type in Access-Control-Expose-Headers, fix #80
1 parent 4dda6aa commit a703408

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

draft-dejong-remotestorage-04.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,7 @@ Internet-Draft remoteStorage December 2014
613613
Access-Control-Allow-Origin: *
614614
Access-Control-Allow-Methods: GET
615615
Access-Control-Allow-Headers: If-Match, If-None-Match
616-
Access-Control-Expose-Headers: ETag, Content-Type, Content-Len\
617-
gth
616+
Access-Control-Expose-Headers: ETag, Content-Length
618617
Content-Type: application/jrd+json
619618

620619
{
@@ -648,14 +647,14 @@ motestorage-04",
648647
the user's "myfavoritedrinks" scope:
649648

650649
GET /oauth/michiel?redirect_uri=https%3A%2F%2Fdrinks-unhosted.5\
650+
apps.com%2F&scope=myfavoritedrinks%3Arw&client_id=https%3A%2F%2Fdrinks-\
651651

652652

653653
de Jong [Page 13]
654654

655655
Internet-Draft remoteStorage December 2014
656656

657657

658-
apps.com%2F&scope=myfavoritedrinks%3Arw&client_id=https%3A%2F%2Fdrinks-\
659658
unhosted.5apps.com&response_type=token HTTP/1.1
660659
Host: 3pp.io
661660

@@ -698,14 +697,14 @@ XjzzzHNjkd1CJxoQubA1o%3D&token_type=bearer&state=
698697
12.4. OPTIONS preflight
699698

700699
When an in-browser application makes a cross-origin request which
700+
may affect the server-state, the browser will make a preflight
701701

702702

703703
de Jong [Page 14]
704704

705705
Internet-Draft remoteStorage December 2014
706706

707707

708-
may affect the server-state, the browser will make a preflight
709708
request first, with the OPTIONS verb, for instance:
710709

711710
OPTIONS /storage/michiel/myfavoritedrinks/ HTTP/1.1
@@ -750,12 +749,12 @@ ntent-Type, Origin, X-Requested-With, If-Match, If-None-Match
750749
12.6. Subsequent PUT
751750

752751

752+
753753
de Jong [Page 15]
754754

755755
Internet-Draft remoteStorage December 2014
756756

757757

758-
759758
A subsequent PUT may contain an 'If-Match' header referring to the
760759
ETag previously returned, like this:
761760

@@ -798,14 +797,14 @@ e.io/spec/modules/myfavoritedrinks/drink"}
798797
Or a 200 OK status, plus a response body:
799798

800799
HTTP/1.1 200 OK
800+
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
801801

802802

803803
de Jong [Page 16]
804804

805805
Internet-Draft remoteStorage December 2014
806806

807807

808-
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
809808
Content-Type: application/json; charset=UTF-8
810809
Content-Length: 106
811810
ETag: "1382694048000"
@@ -848,14 +847,14 @@ charset=UTF-8","Content-Length":106}}}
848847
Referer: https://drinks-unhosted.5apps.com/?
849848
If-Match: "1382694045000"
850849

850+
And the server may respond with a 412 Conflict or a 200 OK status:
851851

852852

853853
de Jong [Page 17]
854854

855855
Internet-Draft remoteStorage December 2014
856856

857857

858-
And the server may respond with a 412 Conflict or a 200 OK status:
859858

860859
HTTP/1.1 412 Conflict
861860
Access-Control-Allow-Origin: https://drinks-unhosted.5apps.com
@@ -898,14 +897,14 @@ Internet-Draft remoteStorage December 2014
898897
to the root folder, it is not necessary to poll each document for
899898
changes individually.
900899

900+
As an example, the root folder may contain 10 directories,
901901

902902

903903
de Jong [Page 18]
904904

905905
Internet-Draft remoteStorage December 2014
906906

907907

908-
As an example, the root folder may contain 10 directories,
909908
each of which contain 10 directories, which each contain 10
910909
documents, so their paths would be for instance '/0/0/1', '/0/0/2',
911910
etcetera. Then one GET request to the root folder '/' will be
@@ -948,14 +947,14 @@ Internet-Draft remoteStorage December 2014
948947
therefore NOT be used for anything else, and the user SHOULD be
949948
warned not to visit any web pages on that origin. In particular, the
950949
OAuth dialog and launch dashboard or token revokation interface
950+
SHOULD be on a different origin than the remoteStorage interface.
951951

952952

953953
de Jong [Page 19]
954954

955955
Internet-Draft remoteStorage December 2014
956956

957957

958-
SHOULD be on a different origin than the remoteStorage interface.
959958

960959
Where the use of bearer tokens is impractical, a user may choose to
961960
store documents on hard-to-guess URLs whose path after
@@ -1000,12 +999,12 @@ Internet-Draft remoteStorage December 2014
1000999
Levels", BCP 14, RFC 2119, March 1997.
10011000

10021001

1002+
10031003
de Jong [Page 20]
10041004

10051005
Internet-Draft remoteStorage December 2014
10061006

10071007

1008-
10091008
[IRI]
10101009
Duerst, M., "Internationalized Resource Identifiers (IRIs)",
10111010
RFC 3987, January 2005.
@@ -1048,14 +1047,14 @@ Internet-Draft remoteStorage December 2014
10481047

10491048
[CORS]
10501049
van Kesteren, Anne (ed), "Cross-Origin Resource Sharing --
1050+
W3C Candidate Recommendation 29 January 2013",
10511051

10521052

10531053
de Jong [Page 21]
10541054

10551055
Internet-Draft remoteStorage December 2014
10561056

10571057

1058-
W3C Candidate Recommendation 29 January 2013",
10591058
http://www.w3.org/TR/cors/, January 2013.
10601059

10611060
[MANIFEST]
@@ -1100,4 +1099,5 @@ Internet-Draft remoteStorage December 2014
11001099

11011100

11021101

1102+
11031103
de Jong [Page 22]

source.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,7 @@ g.com HTTP/1.1
529529
Access-Control-Allow-Origin: *
530530
Access-Control-Allow-Methods: GET
531531
Access-Control-Allow-Headers: If-Match, If-None-Match
532-
Access-Control-Expose-Headers: ETag, Content-Type, Content-Len\
533-
gth
532+
Access-Control-Expose-Headers: ETag, Content-Length
534533
Content-Type: application/jrd+json
535534

536535
{

0 commit comments

Comments
 (0)