blob: 7e9c0e940fc425da369c35c31dd0a64b1afa7e83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
---
title: 101 switch di protocolli
slug: Web/HTTP/Status/101
tags:
- HTTP
- HTTP Status Code
- Referenza
- WebSockets
translation_of: Web/HTTP/Status/101
---
<div>{{HTTPSidebar}}</div>
<p>Il codice di risposta (response) HTTP <code><strong>101 Switching Protocols</strong></code> indica il protocollo cui il server sta passando, come richiesto dal client che ha inviato il messaggio includendo {{HTTPHeader("Upgrade")}} nell'header della richiesta.</p>
<p>In questa risposta il server include l'header {{HTTPHeader("Upgrade")}} che indica qual'è il protocollo adottato. Il processo è descritto in dettaglio nell'articolo <a href="/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism">Protocol upgrade mechanism</a>.</p>
<h2 id="Status">Status</h2>
<pre class="syntaxbox">101 Switching Protocols</pre>
<h2 id="Esempi">Esempi</h2>
<p>Switching protocols può essere usato con <a href="/en-US/docs/Web/API/WebSockets_API">WebSockets</a>.</p>
<pre>HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade</pre>
<h2 id="Specifiche">Specifiche</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Title</th>
</tr>
<tr>
<td>{{RFC("7231", "101 Switching Protocol" , "6.2.2")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</td>
</tr>
</tbody>
</table>
<h2 id="Vedi_anche">Vedi anche</h2>
<ul>
<li><a href="/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism">Protocol upgrade mechanism</a></li>
<li><a href="/en-US/docs/Web/API/WebSockets_API">WebSockets</a></li>
<li>{{HTTPHeader("Upgrade")}}</li>
<li>{{HTTPStatus("426")}} <code>Upgrade Required</code></li>
</ul>
|