Edgewall Software

Changes between Version 8 and Version 9 of Master Slave Protocol Http


Ignore:
Timestamp:
Jul 24, 2007, 4:03:42 PM (17 years ago)
Author:
cmlenz
Comment:

Use of cookies

Legend:

Unmodified
Added
Removed
Modified
  • Master Slave Protocol Http

    v8 v9  
    4343HTTP/1.1 201 Created
    4444Location: http://example.org/builds/trunk/123/
     45Set-Cookie: slave=lamech; Path=/builds/trunk/123/
    4546}}}
    4647
    4748The response contains the URL to a build recipe as the value of the `Location` header. At this point, the master has allocated a pending build entity in its database. The progress on this build can be viewed as HTML at the specified URL using any HTTP user agent.
     49
     50The master also sets a cookie on the slave so that it can be identified on subsequent requests. In the example above, the cookie contains only the slave name; we'll probably need to include more information, such as when the build was started.
    4851
    4952On the other hand, if the master has no work for the slave, it would return a `204 No Content` response:
     
    5356HTTP/1.1 204 No Content
    5457}}}
     58
     59  ''Open issue: we'd need to either repost the slave name/info with every request, or set a cookie that identifies the slave on subsequent requests.''
    5560
    5661== Build Initiation ==
     
    6267GET /builds/trunk/123/ HTTP/1.1
    6368Host: example.org
     69Cookie: slave=lamech
    6470Accept: application/x-bitten+xml
    6571}}}
     
    112118PUT /builds/trunk/123/steps/test/ HTTP/1.1
    113119Host: example.org
     120Cookie: slave=lamech
     121Content-Type: application/x-bitten+xml
     122Content-Length: 666
    114123
    115124<result status="success" started="2005-06-29T16:41:53" duration="7.61">
     
    137146PUT /builds/trunk/123/files/foobar-r123.tar.gz HTTP/1.1
    138147Host: example.org
     148Cookie: slave=lamech
    139149Content-Type: application/tar
    140150Content-Encoding: gzip