HTTP协议传输过程中的转义字符(upgrade)

我们在实际工作中可能会遇到使用一些sniff的软件去捕获http的包并且分析,并且如果是直接基于socket方式的访问需要直接使用转义字符(特殊字符)来向server端发起请求,下面是一些特殊符号和转义字符的使用,plus一个例子,通过这样的转换我们也可以使用nc等命令向一个端口发出指令.这样服务器端和客户端就能基于http进行传输和解析.
[ is %5b,
] is %5d,
" is %22
& is  &
'  is  '
< is  &lt;
> is  &gt;
" is  &quot;
Sample:
/1/101/services/pss/~~/Player%5b@playerID=%221000739%22%5d/@watchers<Player-watchers><watchers><Watcher><playerID>1000747</playerID><nickname>N2002</nickname><watcherPendingTimestamp>20080217032801.0Z</watcherPendingTimestamp><relationshipType><m/></relationshipType><chatMessageCounter>1</chatMessageCounter><emailsReceivedCounter>1</emailsReceivedCounter><intimacyLevel>1</intimacyLevel></Watcher></watchers>
</Player-watchers>
=
/1/101/services/pss/~~/Player[@playerID="1000739"]/@watchers<Player-watchers><watchers><Watcher><playerID>1000747</playerID><nickname>N2002</nickname><watcherPendingTimestamp>20080217032801.0Z</watcherPendingTimestamp><relationshipType><m/></relationshipType><chatMessageCounter>1</chatMessageCounter><emailsReceivedCounter>1</emailsReceivedCounter><intimacyLevel>1</intimacyLevel></Watcher></watchers>
</Player-watchers>

你可能感兴趣的:(工作,socket)