~ubuntu-branches/ubuntu/utopic/libsoup2.4/utopic

« back to all changes in this revision

Viewing changes to docs/reference/html/libsoup-server-howto.html

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-09-20 21:05:44 UTC
  • mfrom: (1.5.21)
  • Revision ID: package-import@ubuntu.com-20120920210544-rfgh5s09da1hlmwq
Tags: 2.39.92-1
* New upstream release.
* Track unstable versions in the experimental branch.
* Bump Build-Depends on libglib2.0-dev to (>= 2.33.14) so we don't pick up
  the version from unstable. This will also generate a tight enough
  dependency. Closes: #687388

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
<td valign="top" align="right"></td>
30
30
</tr></table></div>
31
31
<div class="refsect2">
32
 
<a name="id457416"></a><h3>Creating a SoupSession</h3>
 
32
<a name="id453354"></a><h3>Creating a SoupSession</h3>
33
33
<p>
34
34
As with the client API, there is a single object that will encapsulate
35
35
most of your interactions with libsoup. In this case, <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>.
99
99
</div>
100
100
<hr>
101
101
<div class="refsect2">
102
 
<a name="id467334"></a><h3>Adding Handlers</h3>
 
102
<a name="id463272"></a><h3>Adding Handlers</h3>
103
103
<p>
104
104
By default, <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
105
105
returns "404 Not Found" in response to all requests (except ones that
138
138
</div>
139
139
<hr>
140
140
<div class="refsect2">
141
 
<a name="id487423"></a><h3>Responding to Requests</h3>
 
141
<a name="id483361"></a><h3>Responding to Requests</h3>
142
142
<p>
143
143
A handler callback looks something like this:
144
144
</p>
201
201
<code class="literal">chunked</code> encoding.
202
202
</p>
203
203
<div class="refsect3">
204
 
<a name="id470794"></a><h4>Responding with <code class="literal">Content-Length</code>
 
204
<a name="id466732"></a><h4>Responding with <code class="literal">Content-Length</code>
205
205
Encoding</h4>
206
206
<p>
207
207
This is the simpler way to set a response body, if you have all of the
280
280
 
281
281
</div>
282
282
<div class="refsect3">
283
 
<a name="id470826"></a><h4>Responding with <code class="literal">chunked</code> Encoding</h4>
 
283
<a name="id466764"></a><h4>Responding with <code class="literal">chunked</code> Encoding</h4>
284
284
<p>
285
285
If you want to supply the response body in chunks as it becomes
286
286
available, use <code class="literal">chunked</code> encoding instead. In this
314
314
</div>
315
315
<hr>
316
316
<div class="refsect2">
317
 
<a name="id470983"></a><h3>Handling Authentication</h3>
 
317
<a name="id466921"></a><h3>Handling Authentication</h3>
318
318
<p>
319
319
To have <a class="link" href="SoupServer.html" title="SoupServer"><span class="type">SoupServer</span></a>
320
320
handle HTTP authentication for you, create a <a class="link" href="SoupAuthDomainBasic.html" title="SoupAuthDomainBasic"><span class="type">SoupAuthDomainBasic</span></a>