Errata

RESTful Web Services

Errata for RESTful Web Services

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page xviii
4th paragraph, last sentance

"this book will show you to do it" should read "this book will show you how to do it"

Anonymous    Feb 01, 2011
Printed
Page xix

"It shows" -> "We show"

Anonymous    Feb 01, 2011
Printed
Page 1
general note

The note on page 1 states "Every URI on the web is also a URL". This is not true, an URL IS an URI but not all URIs are URLs.

Note from the Author or Editor:
"Every URI on the web" is not the best choice of words. Change it to "Every HTTP URI".

Anonymous  Oct 16, 2009  May 02, 2011
Printed
Page 2
last code snippet on page

The comment says "amazon-book-search.rb", but the next page executes "ruby amazon-search.rb".

Note from the Author or Editor:
On page 3, change "ruby amazon-search.rb" to "ruby amazon-book-search.rb".

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 3
First paragraph

It says "customize the Ruby code with your Access Key ID", however the code actually takes that as a command-line argument.

Note from the Author or Editor:
Change "customize the Ruby code with your Access Key ID" to "pass in the Access Key ID as a command-line argument"

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 5.5.3
2nd to last paragraph

Paragraph has double quotes after the '4' that should be removed:
In Section 5.4"

Corresponds to page 123 of print book. Problem is only in Safari version.

Anonymous   
Printed
Page 7
5/10ths down the page

It says "This response has 11 headers", but I actually count 10 of them.

Note from the Author or Editor:
Change "This response has 11 headers" to "This response has 10 headers".

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 11
4/10ths and 6/10ths down the page

It says the method information is "doGoogleSearch" and that that's also found in the SOAPAction HTTP header. However, that header says "urn:GoogleSearchAction".

Note from the Author or Editor:
I no longer know what's going on here, but all of the Google SOAP operations have a soapAction of "urn:GoogleSearchAction", so the book is wrong in claiming a connection between the SOAPAction and the tag within the SOAP envelope.

Remove the sentence starting "It's also found in the value of the SOAPAction HTTP request header..."

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 13

"Starting in chapter 5" -> "Starting in chapter 4"
"In Resource-Oriented Architectures" -> "In resource-oriented architectures"


Anonymous    May 02, 2011
Printed
Page 17

"Split the Data Set into Resources [115]" -> "chapter 5"

Anonymous    Jun 03, 2011
Printed
Page 17
2nd Paragraph, 1st Sentance

"happen to live into the URI portion" should read "happen to live in the URI portion"

Anonymous    Feb 01, 2011
Printed
Page 18

"a RESTful web services" -> "a RESTful web service"

Anonymous    Feb 01, 2011
Printed
Page 27

"under same rules" -> "under the same rules"

Anonymous    Feb 01, 2011
Printed
Page 28

The sentences starting "The del.icio,.us web service sends back..." should go between example 2-2 and example 2-3.

Anonymous    Jun 03, 2011
Printed
Page 31
4/10ths down the page

It says, "I've added two keyword arguments to open::method, which lets...". There should be a space between those two colons.

Note from the Author or Editor:
Replace "open::method" with "open: method".

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 31

The sentence "I've added two keyword arguments to open: :method" is
confusing because there are two colons next to each other, and it
looks like a Ruby method called open::method. Rephrase to "I've added
two keyword arguments to open. They are :method..."

Strike the line "require 'rubygems'" from example 2-4.

Anonymous    Jun 03, 2011
Printed
Page 32
HTTP feature matrix

Your ditto marks are not clear to me. It seems that they must be read horizontally, e.g. Net:HTTP provides Basic support for Auth methods, No support for Caching, and Yes support for Proxies.

I have always only used ditto marks vertically - I've never used them horizontally, so your matrices (not
just the one on page 32) are confusing

Note from the Author or Editor:
Explicitly spell out the ditto marks in tables 2-1, 2-2, and 2-3.

To avoid repeating "Yes (assuming the net/https library is installed)" and "Yes (assuming Python was compiled with SSL support)", put "Assuming the net/https library is installed" and "Assuming Python was compiled with SSL support" into a footnote, and just say "Yes" three times:

HTTPS | Yes* | Yes* | Yes* |
HTTP verbs | GET | All | All |
Custom data | No | Yes | Yes |
Custom headers | Yes | Yes | Yes |
...

* Assuming the `net/https` library is installed.

Similarly for table 2-2:

HTTPS | Yes* | Yes* | Yes* |
HTTP verbs | GET, POST | All | All |
Custom data | Yes | Yes | Yes |
Custom headers | Yes | Yes | Yes |
...

* Assuming Python was compiled with SSL support.

Anonymous    May 02, 2011
Printed
Page 35
top third of page

/**
* A command-line application that fetches bookmarks from del.icio.us
* and prints them to strandard output.
*/

strandard --> standard

Anonymous    Feb 01, 2011
Printed
Page 36
C# code example

I've been working in C# lately, so I tried this example first. In a nutshell, https://api.del.icio.us/v1/
posts/recent failed to respond (within 10 seconds), so the example won't work. I would imagine the other
examples (in other languages) won't work either, though I haven't tried them.

Note from the Author or Editor:
At the bottom of the section "What the Sample Clients Do" (page 28), add this paragraph:

To use any of these clients, you'll need to create a del.icio.us account. Some of the clients hard-code the strings "username" and "password"; you'll need to substitute your del.icio.us username and password.

Anonymous    May 02, 2011
Printed
Page 38

"Basic HTTP, GET, and POST" -> "Basic HTTP GET and POST"

Anonymous    Feb 01, 2011
Printed
Page 40
Ruby: REXML, I Guess

I was dismayed to find a reference (pg 40, Ch 2, Ruby:
REXML, I Guess), to whytheluckystiff.net, which I learned almost
immediately learned that "Why" had gone reclusive and pulled all his
sites down.

===
From Author:
This URL will work for hpricot http://github.com/whymirror/hpricot
and http://github.com/whymirror/ for any other _why stuff. I think we
also mention Park Place: http://github.com/whymirror/parkplace

Note from the Author or Editor:
Change the URL "http://code.whytheluckystiff.net/hpricot/" to
"http://github.com/whymirror/hpricot". On page 97, change the URL "http://code.whytheluckystiff.net/parkplace" to "http://github.com/whymirror/parkplace".

Anonymous  Dec 04, 2009  May 02, 2011
Printed
Page 45

Example 2-3; the line between the two "alert" calls should not be indented any more than the lines that surround it. That is,

alert(
json =
alert(

Anonymous    Feb 01, 2011
Printed
Page 49

"defects the RPC style" -> "defects to the RPC style"

Anonymous    Feb 01, 2011
Printed
Page 51

"Object.value=" -> "S3Object.value="

Anonymous    Feb 01, 2011
Printed
Page 55

"39 official HTTP" -> "41 official HTTP"

Anonymous    Feb 01, 2011
Printed
Page 58

"Now, as shown in Example 3-6, let's write the S3::Bucket class,"
->
"Now, let's write the S3::Bucket class (Example 3-6),"

Anonymous    May 02, 2011
Printed
Page 65

"This is a job for public-key cryptography" -> "S3 solves this problem using a message authentication code (MAC)".

your "private" key (remember, not truly private: Amazon knows it too)"
->
your secret key (remember, the secret is shared between you and Amazon)

Only someone with the "private" key
->
Only someone who knows the secret

revealing your "private" key
->
revealing the secret

know your "private" key
->
know your secret

Anonymous    May 02, 2011
Printed
Page 65
2nd paragraph

The book states that Amazon S3 uses "public-key cryptography" to authenticate requests. This is totally
wrong. S3 uses a message authentication code (MAC), which is symmetric key cryptography. That is, it uses
a secret shared by both parties: the client (S3 user) and server (Amazon).

The clues that S3 is not using public-key crypto are in the text. When mentioning your "private" key is
says "(remember, not truly private: Amazon knows it too)".

This mistake is riddled throughout chapter 3. It repeatedly calls the Access Key ID a "public key". It is
in no way a public key. It is an identifier, equivalent to a user-id or username. For instance, on page 56
in the code for "module Authorized" includes "@@public_key" & "@@private_key".

Change "public key" to "key id".
Change "private key" to "secret key".
Change "public-key cryptography" to "cryptography".

Note from the Author or Editor:
Make the terminology change as suggested.

Anonymous    May 02, 2011
Printed
Page 66

signs it (again, Amazon has a copy of your "private"key)
->
signs it (again, Amazon knows your secret key)

Anonymous    Feb 01, 2011
Printed
Page 67
3/10ths down the page

It says "# Add it to the header has." I think it meant to say "hash" ;)

Note from the Author or Editor:
Change

# Add it to the header has.

to

# Add it to the header hash.

Anonymous  Dec 01, 2008  May 02, 2011
PDF
Page 72
5th Paragraph

The paragraph suggests using the 'scaffold_resource' generator, but this does not exist in the version of Ruby shipped with OS X 10.6.2 (Ruby 1.8.7).

Using 'scaffold' in place of 'scaffold_resource' appears to work correctly.

Note from the Author or Editor:
Change 'scaffold_resource' to 'scaffold' throughout this page. Rails generates different files now, but the general picture is correct.

Anonymous  Feb 16, 2010  May 02, 2011
Printed
Page 82

"in Preface" -> "in the Preface"

Anonymous    Feb 01, 2011
Printed
Page 85

"Name the Resources" section. -> "Name the Resources" section of chapter 5.

Anonymous    Jun 03, 2011
Printed
Page 88
Figure 4-1

Two of the arrows in Figure 4-1 are wrong. The arrow going from
"Initial State" to "'mice', page 2" should have a solid line and be
labeled "Request". The arrow going back from 'mice', page 2" to
"Initial State" should have a dotted line and be labeled "Response".

Anonymous   
Printed
Page 89

"start=50, and" -> "start=500, and"

The two sentence beginning "However, there is something unRESTful"
should be put into parentheses or made into a footnote. "The Trouble
with Cookies" should include a reference to the chapter in which it's
found: chapter 8.

Anonymous    May 02, 2011
Printed
Page 89 and many other pages - do a global search (11 times total)
Line 2

"neccessary" -> "necessary"

Anonymous    Feb 01, 2011
Printed
Page 89
Third complete paragraph

"addressabile" -> "addressable"

Anonymous    Feb 01, 2011
Printed
Page 90

"bits of client state" -> "bits of application state"

"process it" -> "process the request"

"That's client state:" -> "That's application state:"

Anonymous    May 02, 2011
Printed
Page 90
last paragraph, 3rd sentence

"and the server restricts" -> "and the server"

Anonymous    Feb 01, 2011
Printed
Page 91
Last paragraph

"unneccessary" -> "unnecessary"

Anonymous    Feb 01, 2011
Printed
Page 95
1st paragraph

cache of the extrenal page
=>
cache of the external page

Anonymous    Feb 01, 2011
Printed
Page 98

"saw the HEAD method" -> "You saw the HEAD method"

Anonymous    Feb 01, 2011
Printed
Page 100
2nd Para, @nd Sentence

'neccessary' -> 'necessary'

Anonymous  Jul 19, 2010  Jun 03, 2011
Printed
Page 100
3rd para, 3rd line, right hand end

'...and use it...' -> 'and uses it'

Anonymous  Jul 19, 2010  May 02, 2011
Printed
Page 101

"accepts POST requests" -> "accepts a POST request"

Anonymous    Feb 01, 2011
Printed
Page 102

"Multiplying by any other number" -> "Multiplication by any other number"

Anonymous    Feb 01, 2011
Printed
Page 103

"50" -> "-50"

Anonymous    Feb 01, 2011
Printed
Page 109-110

. The given procedure for turning requirements into read-only resources is exactly the same as the procedure given in chapter 6. It
should be a slightly simpler procedure. As printed, steps 4 and 6 are
unnecessary for read-only resources. They should be omitted. The
procedure should have seven steps as follows:

1. Figure out the data set
2. Split the data set into resources

For each kind of resource:

3. Name the resources with URIs
4. Design the representation(s) served to the client
5. Integrate this resource into existing resources, using hypermedia
links and forms
6. Consider the typical course of events: what's supposed to happen?
7. Consider error conditions: what might go wrong?

> resources is exactly the same as the procedure given in chapter 6. It
> should be a slightly simpler procedure. As printed, steps 4 and 6 are
> unnecessary for read-only resources. They should be omitted. The
> procedure should have seven steps as follows:

Correction to the correction: steps 4 and _5_ are the unneccesary ones.

Anonymous    May 02, 2011
Printed
Page 112
Split the Data Set into Resources, first paragraph, 3rd line

Anything that might be refereed to by name ought...
should be:
Anything that might be referred to by name ought...

Anonymous    May 02, 2011
Printed, PDF
Page 119
2nd paragraph

"I'm going to use a comma to separate latitude and longitude." Then the next paragraph uses semicolon "/v1/Earth/43.9;-103.46..." and semicolon runs rampant throughout chapters 5 and 6.

Note from the Author or Editor:
The following URIs should have a comma separating latitude and longitude instead of a semicolon. Page numbers are given for the PDF edition:

p139: /v1/Earth/43.9;-103.46/Mount%20Rushmore
p143: http://maps.example.com/Earth/24.9195;17.821?show=arsenic
p147: /road.1/Earth/37.0;-95.8
p147: /road.3/Earth/37.0;-95.8
p148: http://maps.example.com/road/Earth.8/images/37.0;-95.png
p151: /Earth/43.9;-95.9
p151: /road/Earth/43.9;-95.9
p151: /satellite/Earth/43.9;-95.9
p152: /Earth/43.9;-103.46
p152: /road/Earth/43.9;-95.9
p152: /satellite/Earth/43.9;-95.9
p153: /Earth/43.9;-95.9/Mount%20Rushmore
p159: /Earth/43.9;-95.9/Mount%20Rushmore
p178: /user/samruby/Earth/45.2;-114.2/Joe?s%20Diner
p178: /user/leonardr/Earth/45.2;-114.2/Joe's%20Diner
p179: /user/bob/Earth/42;-93.7/the%20cornfield%20where...
p179: /Earth/42;-93.7
p179: /user/leonardr/Earth/43.9;-103.46/Mount%20Rushmore
p180: /Earth/43.9;-103.46
p182: /Earth/42;-93.7
p182: /Earth/43.9;-103.46
p182: /Earth/43.9;-103.46
p183: /road/Earth/43.9;-103.46
p183: /satellite/Earth/43.9;-103.46
p184: /user/leonardr/Earth/43.9;-103.46/Mt.%20Rushmore
p185: /user/leonardr/Earth/43.9;-103.46/Mt.%20Rushmore
p245: /road.1/Earth/37.0;-95.8
p245: /road.3/Earth/37.0;-95.8
p246: /road.8/Earth/40.76;-73.98.png

Shawn Hoover  Jan 25, 2009  May 02, 2011
Printed
Page 121

The footnote should be attached to "detailed", not "get."

Anonymous    May 02, 2011
Printed
Page 125
Example 5-4

The closing tag of the XML example -- "maps" -- doesn't match the opening tag "planets".

Note from the Author or Editor:
Change </maps> to </planets>.

Anonymous  Jul 15, 2008  May 02, 2011
Printed
Page 125
Example 5-3

Says:
[{url="http://maps.example.com/Earth,description="Earth"},
{url="http://maps.example.com/Venus,description="Venus"},
...]

The JSON format requires names to be quoted and name/value pairs to be separated by colons (and not by an "equals" sign as in the example). I think the correct example should be:

[{ "url" : "http://maps.example.com/Earth", "description" : "Earth"},
{ "url" : "http://maps.example.com/Venus", "description" : "Venus"},
...]

The JSON specification is at http://json.org and a json validator can be found http://jsonlint.com

Note from the Author or Editor:
Example 5-3 should read as follows:

[{"url": "http://maps.example.com/Earth", "description": "Earth"},
{"url": "http://maps.example.com/Venus", "description": "Venus"},
...]

Anonymous  Dec 27, 2008  May 02, 2011
Printed
Page 125
Example 5-3

[{url="http://maps.example.com/Earth,description="Earth"},
{url="http://maps.example.com/Venus,description="Venus"},

should have quotes after the text of each URL:

[{url="http://maps.example.com/Earth",description="Earth"},
{url="http://maps.example.com/Venus",description="Venus"},

Anonymous    May 02, 2011
Printed
Page 128, 129

Both figures should say "(Image data courtesy Google Maps")

Anonymous    Jun 03, 2011
Printed
Page 129

"directly to the east" -> "the part directly to the east"

Anonymous    Feb 01, 2011
Printed
Page 131
Example 5-8

To confirm and add to an existing report: the XHTML is poorly formed. For example, the opening <dd> tag is missing for the "maps" unnumbered list.

Note from the Author or Editor:
In example 5-7, the line reading:

<li><a class="map" href="/satellite/Earth">Satellite</a>

should read:

<li><a class="map" href="/satellite/Earth">Satellite</a></li>

In example 5-8, the section beginning "<dt>maps</dt>" and ending "..." should read as follows:

<dt>maps</dt>
<dd>
<ul class="maps">
<li><a class="map" href="/road/Earth/43.9;-95.9">Road</a></li>
<li><a class="map" href="/satellite/Earth/43.9;-95.9">Satellite</a></li>
...

In other words, the </dd> tag is replaced with </li>, the second <li> tag has a </li> tag added to the end, and the <ul> tag is contained within a <dt> tag.

Also in Example 5-8, the document should end like this:

</dl>
</li>
</ul>
</body>
</html>

In other words, a </ul> should be inserted between the </li> and the </body>.

Anonymous  May 18, 2008  May 02, 2011
Printed
Page 148

"steps 3 and 4" -> "steps 4 and 5"

Anonymous    May 02, 2011
Printed
Page 167

"ang architecture" -> "an architecture"

Anonymous    Feb 01, 2011
Printed
Page 170
Example 7-1, "create_table" commands for users and bookmarks

The table definitions for "users" and "bookmarks" are incorrect. The column "user_id" should be in the "users" table, not the "bookmarks" table. Also, in order for the join table "user_bookmarks" to work, the "bookmarks" table should have a primary key column called ""bookmark_id".

Note from the Author or Editor:
Add "t.column :user_id, :string" to the first create_table block, like so:

create_table :users, :force => true do |t|
t.column :user_id, :string
t.column :name, :string
...

Change the first t.column in the second create_table block from "user_id" to "bookmark_id".

Anonymous  May 18, 2008  May 02, 2011
Printed
Page 176
mid page

"if you know one you can calculate the other" -> "if you know the
former you can calculate the latter".

Anonymous    Feb 01, 2011
Printed
Page 179
under "The Leftovers"

"There's already a solution for this built into HTTP: conditional GET. I cover it briefly in __"Conditional HTTP GET"__ later in this chapter and I'll cover it in more detail in __"Conditional GET,"__ but in this chapter you'll see it implemented. By implementing conditional GET, I can give the time- and bandwidth-saving benefits of posts/update to most of of the resources I'm exposing, not just the single most expensive one."

For the first, it should be "Conditional GET" actually. For the second, it should be "Conditional GET in Chapter 8"

Note from the Author or Editor:
Change this sentence:

I cover it briefly in ?Conditional HTTP GET? later in this chapter and I?ll cover it in more detail in ?Conditional GET,? but in this chapter you?ll see it implemented.

to this:

I cover it briefly in ?Conditional GET? later in this chapter and I?ll cover it in more detail in Chapter 8, but in this chapter you?ll see it implemented.

Anonymous    May 02, 2011
Printed
Page 179

The last sentence of the section "The Leftovers" contains a redundant "of".

Anonymous    Feb 01, 2011
Printed
Page 180
Table 7-4

All three occurrences of

GET /posts/

should instead read

GET /users/

Note from the Author or Editor:
In the middle column of 7.4, replace /posts/{username} with /users/{username}. Do *not* change /posts/ to /users/ in the right column.

Anonymous  Jan 06, 2011  May 02, 2011
Printed
Page 183
Example 7-4

All the end tags are </body>, rather than matching the opening tag.

Should be:
<full-name>Leonard Richardson</full-name>
<email>leonardr@example.com</email>
<password>mypassword</password>

Note from the Author or Editor:
Change the document to read as follows:

<user>
<name>leonardr</name>
<full-name>Leonard Richardson</full-name>
<email>leonardr@example.com</email>
<password>mypassword</password>
</user>

Anonymous    May 02, 2011
Printed
Page 184
General Note, 1st paragraph

...reimplements something you can already, do...

should be

...reimplements something you can already do...

(without comma)

Anonymous    Feb 01, 2011
Printed
Page 187

The last sentence of the 4th paragraph missed a period at the end of the sentence after "more generally".

Anonymous    Feb 01, 2011
Printed
Page 196
Example 7-13

The title tag is not closed properly.

Note from the Author or Editor:
Change

<title>REST and WS-*/title>

to

<title>REST and WS-*</title>

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 198
Example 7-15

# There was a problem saving the __bookmark__ to the database.
# Send the validation error messages along with a response
# code of 400.

should be user account actually.

Note from the Author or Editor:
Change "There was a problem saving the bookmark" to "There was a problem saving the user".

Anonymous    May 02, 2011
Printed
Page 198
Second paragraph

"data validation errors fail" -> "data validation fails"

Anonymous    May 02, 2011
Printed
Page 201
the second sentence in the last paragraph

"I can get this data fairly easily with ActiveResource, and format it as a representation with to_xml__but what about security__?"

There should be a comma before "but what about security".

Anonymous    Feb 01, 2011
Printed
Page 202
Example 7-20, The second line the of comment

This PUT handler is a little __tricker__ than others, ....

should be "trickier" actually.

Anonymous    Feb 01, 2011
Printed
Page 207
middle

Digest::MD5.new(new_uri).to_s doesn't work with the current version of Ruby

The correct code is:

Digest::MD5.hexdigest(new_uri)

to_s is unnecessary

Note from the Author or Editor:
Replace "Digest::MD5.new(new_uri).to_s" with "Digest::MD5.hexdigest(new_uri)".

Anonymous  Jul 21, 2008  May 02, 2011
Printed
Page 211
Top of the page

It says:

response_code = e.io.status[0].to_i
if response_code == "409" # Conflict

I'm guessing you should compare ints to ints and strings to strings.

Note from the Author or Editor:
Change

if response_code == "409"

to:

if response_code == 409

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 217
3rd paragraph

HTTP/1.1:
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14>

"A server SHOULD provide a Content-Location for the variant corresponding to the response entity; especially in the case where a resource has multiple entities associated with it, and those entities actually have separate locations by which they might be individually accessed, the server SHOULD provide a Content-Location for the particular variant which is returned."

From the book:
"When a client requests one of the representation-specific URIs, you should set the Content-Location response header to /releases/104".

So, if I understand correctly, the spec says to use Content-Location to specify the "permanent" URL of the returned response entity when a canonical URL is accessed. You seem to suggest the other way around. Witch one is the right use for the header? Both?

Note from the Author or Editor:
The book is wrong. The SHOULD in the RFC says that the generic URL (/releases/104) should serve the specific URL (/releases/104.en) in Content-Location, and the recommendation in the book is for the specific URL to serve the generic URL. The SHOULD also implies that should the specific URL serves Content-Location, its value should be the specific URL (/releases/104.en). This isn't very useful, but that's what the RFC says.

There ought to be an HTTP method that is the opposite of Content-Location, but that's too big a project to undertake in this venue.

Remove the entire paragraph starting "When a client requests one of the representation-specific URLs..."

This also affects the discussion of Content-Location in the appendix, on page 394. The last paragraph of the "Content-Location" section should be changed to read as follows:

This is mainly useful for services that assign different URLs to different representations of the same resource. If the client wants to link to the specific representation obtained through content negotiation, it can use the URI given in Content-Location. So if you request `/releases/104`, and use the `Accept` and `Accept-Language` headers to specify an HTML representation written in English, you might get back a response that specifies `/releases/104.html.en` as the value for `Content-Location`.

Aki Bj?rklund  Dec 07, 2008  May 02, 2011
Printed
Page 217
the first sentence of the 4th paragraph

"In the bookmarking service from Chapter 7, I exposed two representations of a set of bookmarks: a generic XML representation at /v1/users/leonardr/bookmarks.xml, and an __Atome__ representation at /v1/users/leonardr/bookmarks.atom.

should be "Atom" instead of "Atome"

Anonymous    Jun 03, 2011
Printed
Page 217
Third line of fourth paragraph

"Atome" -> "Atom"

Anonymous    Feb 01, 2011
Printed
Page 219

see "Overloading POST -> see "Overloading POST" below

Anonymous    Jun 03, 2011
Printed
Page 225
middle of page

"the link text indicate"
should be
"the link text indicates"

Anonymous    May 02, 2011
Printed
Page 235

The sentence starting "Except for the protocol change..." should be in
parentheses.

Anonymous    Feb 01, 2011
Printed
Page 237

"URI templates" -> "URI Templates"

Anonymous    Feb 01, 2011
Printed
Page 241
the 3rd paragraph

qop-auth --> qop=auth

Anonymous    May 02, 2011
Printed
Page 248

"about it use" -> "about its use"

Anonymous    Feb 01, 2011
Printed
Page 249

"If the client then..." -> "If a client"

"from resource is" -> "from http://www.example.com/resource is"

Anonymous    May 02, 2011
Printed
Page 254
the last sentence

put this token the Authorization header -> put this token in the
Authorization header

Anonymous    Feb 01, 2011
Printed
Page 256
the last sentence of the 5th paragraph

his --> her

Anonymous    May 02, 2011
Printed
Page 257
3rd sentence of the 2nd paragraph

authorization --> authentication

Note from the Author or Editor:
Change "fake authorization page" to "fake authentication page".

Anonymous    May 02, 2011
Printed
Page 259
the first sentence of the last paragraph

A new line should be inserted after the Media type line.

Anonymous    Jun 03, 2011
Printed
Page 260
fifth paragraph, sixth sentence

Lists one of the 15 possible resource relationships as "stylesteet" when it should read "stylesheet"

Anonymous  Oct 23, 2009  May 02, 2011
Printed
Page 262 (and also on page 2)
Paragraph following "rel-nofollow" line

"neccessarily" -> "necessarily"

Anonymous    Feb 01, 2011
Printed
Page 271

The sentence starting "The Universal Encoding..." should be a footnote or else put in parentheses.

Anonymous    Jun 03, 2011
Printed
Page 272

"if you're using UTF-16" -> "UTF-16"

Anonymous    May 02, 2011
Printed
Page 274
5th paragraph, last sentence

WRONG: "...should now result in a response code of 310 ("Moved Permanently")..."
RIGHT: "...should now result in a response code of 301 ("Moved Permanently")..."

Anonymous    Feb 01, 2011
Printed
Page 279
3rd last line

The URL in the "Location" header should presumably match the URL in the text on the following page.

WRONG: Location: http://www.example.com/leonardr/photos/my-guinea-pig.atom
RIGHT: Location: http://www.example.com/leonardr/photos/20070124-1.atom

The right URL is mentioned in the middle paragraph on page 280 as the URI to which the document can be PUT
if modified. There seems to be no where else the .../20070124-1.atom URL could have come from.

Note from the Author or Editor:
On page 280, change "http://www.example.com/leonardr/photos/20070124-1.atom" to "http://www.example.com/leonardr/photos/my-guinea-pig.atom".

Anonymous    May 02, 2011
Printed
Page 280
1st line

Delete the initial "<![CDATA[ " before the XML prolog.

I guess this is a hint that the authors wrote the book in XML, but didn't quite get the escaping right
when incuding an XML fragment in an XML document.

Note from the Author or Editor:
Change "<![CDATA[ <?xml" to "<?xml"

Anonymous    May 02, 2011
Printed
Page 285

'https://s3.amazonaws.com/, and then the bucket name' should be in quotes.

Anonymous    May 02, 2011
Printed
Page 287
5th "paragraph"

The "name" of the <input> element does not match the name in the resulting search URLs.

WRONG: <input name="query" type="text" />
RIGHT: <input name="q" type="text" />

as the next paragraph mentions generated URLs:
http://search.example.com/search?q=jellyfish and
http://search.example.com/search?q=chocolate
which include "q=", not "query=".

Note from the Author or Editor:
Change this line:

<input name="query" type="text">

to this:

<input name="q" type="text">

Anonymous    May 02, 2011
Printed
Page 289

"content type" should be "media type" throughout.

Anonymous   
Printed
Page 292
2nd paragraph

It says "v1 inside posts inside recent", however that doesn't match the actual nesting of the tags in the XML.

Note from the Author or Editor:
"v1 inside posts inside recent" should be "recent inside posts inside v1"

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 292

Indentation in example 9-10 is off. The second <doc> tag should be
beneath its enclosing <param> tag, and the <resource path="recent"> tag
should be beneath its enclosing <resource> tag.

Anonymous    May 02, 2011
Printed
Page 293

Similarly for Example 9-11. The <doc> tags should be indented beneath their enclosing <param> tags.

Anonymous    May 02, 2011
Printed
Page 305
First complete paragraph (after Example 10-4), penultimate sentence

"SOAP messages, send over HTTP" -> "SOAP messages, sent over HTTP."

Anonymous    May 02, 2011
Printed
Page 307

"It abstracts away" -> "They abstract away"

Anonymous    Feb 01, 2011
Printed
Page 310
Last paragraph

"It's possible to prove the originator of a given message was long after it sent, and that the message was
not modified after it was received" -> "It's possible to prove who the originator of a given message was
long after it was sent, and that the message was not modified after it was sent." (Of course, if it hasn't
been modified since it was received, it hasn't been modified since it was sent, but the recipient
generally wants to be sure that the message hasn't been tampered with before receipt.)

Anonymous    May 02, 2011
Printed
Page 311
First paragraph without a bullet

"one-off solutions are possible" -> "one-off solutions are not possible".

Anonymous    May 02, 2011
Printed
Page 317

"this next." -> "this later."

Anonymous    May 02, 2011
Printed
Page 322

"The chart below has the details, but"
Strike. There is no chart.

Anonymous    May 02, 2011
Printed
Page 331

Paragraph "There's also an insecure method" should be in parentheses.

Anonymous    Feb 01, 2011
Printed
Page 333
First sentence

The text refers to "the Ajax application delicious-ajax.html," but I don't think the name is used
elsewhere. This seems to be referring to the Ajax client listed in Examples 11-1 through 11-5.

Note from the Author or Editor:
Change "The Ajax application delicious-ajax.html" to "The Ajax application defined in Examples 11-1 through 11-5".

Anonymous    May 02, 2011
Printed
Page 337
Code example at the top of the page

img.setAttribute("title", image["Height"]);

Oops, that's a copy-and-paste bug ;)

Note from the Author or Editor:
img.setAttribute("title", image["Height"]) should be img.setAttribute("title", image["Title"])

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 340

"GET, POST, and/or DELETE" -> "GET, PUT, and/or DELETE"

Anonymous    May 02, 2011
Printed
Page 341
Last bullet point

"PUT /weblogs/{id}: Delete a weblog."

PUT != DELETE

Note from the Author or Editor:
Change "PUT" to "DELETE".

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 341

"six standard methods" -> "five standard methods"

also

"PUT /weblogs/{ID}: Delete a weblog"
"PUT" should be "DELETE"

Anonymous    Feb 01, 2011
Printed
Page 351
Figure 12-2

Application box in Fig 12-2 should contain three different resources to match the subsequent code snippet: UserResource, BookmarksResource, and BookmarkResource. The (plural) BookmarksResource is missing from Figure 12-2.

Note from the Author or Editor:
Change the lowermost box in figure 12-2 to say "BookmarksResource" instead of "BookmarkResource".

Bob  Apr 15, 2009  May 02, 2011
Printed
Page 353
Example 12-9, near the top of the page

The indenting of the code in the if statement is inconsistent.

Note from the Author or Editor:
The five lines starting with:

sb.append("User details\n");

and ending with:

result = new StringRepresentation(sb);

should be indented right four spaces to line up with the first call to sb.append().

Anonymous    May 02, 2011
Printed
Page 357
Two thirds of the way down the page, in the paragraph following Example 12-11

"users/jacobian/tags/python" should be "users/jacob/tags/python" to match the prose that follows, or the prose should change from "jacob" to "jacobian."

Note from the Author or Editor:
Change 'two arguments: "jacob"' to 'two arguments: "jacobian"'.

Anonymous    May 02, 2011
Printed
Page 361
second code block - example 12.16

One part of the basic authentication code is incorrect and will not work for all cases:

basic_info = auth_info.lstrip("Basic ")

lstrip removes all *characters* in the string, so if the base64 encoded username+password starts with, e.g., a or c, then that character will be removed and the encoded string will be invalid and result in an error on the base64 decode.

There are probably lots of alternative implementations, but here is one that works:

basic_info = auth_info[len("Basic "):]

Note from the Author or Editor:
Replace this:

basic_info = auth_info.lstrip("Basic ")

with this:

basic_info = auth_info[len("Basic "):]

Rebecca Koeser  Oct 20, 2010  May 02, 2011
Printed
Page 365

"few resources of your own" -> "few new resources"

Anonymous    Feb 01, 2011
Printed
Page 384
last line

Line reads: 'but in that case the response code is 414 ("Request Entity Too Large").'
The response code isn't 414 but 413, 414 reads "Request-URI Too Long".

Note from the Author or Editor:
Change "the response code is 414" to "the response code is 413".

UweS  Jul 21, 2010  May 02, 2011
Printed
Page 384

"their request" -> "the request"

Anonymous    Feb 01, 2011
Printed
Page 391
Accept-Language, 3rd paragraph

"The client sends an Accept-Charset header" should be "The client sends an Accept-Language header".

(May 2007: First Edition)

Bruce Sinclair  Apr 16, 2009  May 02, 2011
Printed
Page 393
First two "code" sections

It says "Content-Type: text/plain" and then "Content-Type: text/html" when really they're supposed to be the same.

Note from the Author or Editor:
Change "Content-Type: text/html" to "Content-Type: text/plain"

Anonymous  Dec 01, 2008  May 02, 2011
Printed
Page 396

"described next" -> "described later"

Anonymous    May 02, 2011
Printed
Page 396
Second paragraph

"take the value of Expires should as a rough guide" -> "take the value of Expires as a rough guide".

Anonymous    Feb 01, 2011
Printed
Page 398
If-Unmodified-Since, 3rd paragraph

"If-Not-Modified" should be "If-Unmodified-Since"

Anonymous  Jan 19, 2010  May 02, 2011
Printed
Page 398
If-Unmodified-Since, 3rd paragraph

[...] response code 417 ("Precondition Failed").
should be
[...] response code 412 ("Precondition Failed").

Anonymous  Jan 19, 2010  May 02, 2011