Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

minor cleanup

  • Loading branch information...
commit 09444642bc96ef0590f633b430a1e0f7a4eb75a5 1 parent ac369a3
@vinoski vinoski authored
Showing with 14 additions and 12 deletions.
  1. +7 −5 doc/yaws.tex
  2. +7 −7 src/yaws_websockets.erl
View
12 doc/yaws.tex
@@ -1610,11 +1610,13 @@ \section{All out/1 return values}
data in one go. (Typically if a file is very large or if data
arrives from back end servers on the network.)
-\item \verb+{streamcontent_with_timeout, MimeType, FirstChunk, Timeout}+ Similar
- to above, but with an explicit timeout. The deafult timeout is 30 secs. I.e if
- the application fails to deliver data to the Yaws process, the streaming will
- stop. This is often not the desired behaviour in Comet/Ajax applications. It's
- possible to provide 'infinity' as timeout.
+\item
+ \verb+{streamcontent_with_timeout, MimeType, FirstChunk, Timeout}+
+ Similar to above, but with an explicit timeout. The default timeout
+ is 30 secs, i.e. if the application fails to deliver data to the
+ \Yaws\ process, the streaming will stop. This is often not the
+ desired behaviour in Comet/Ajax applications. It's possible to
+ provide 'infinity' as timeout.
\item \verb+{streamcontent_from_pid, MimeType, Pid}+ This return value
is similar to the \verb+streamcontent+ return value above. However
View
14 src/yaws_websockets.erl
@@ -317,7 +317,7 @@ check_reserved_bits(#ws_frame_info{rsv=RSV}) ->
%% http://www.erlang.org/doc/apps/stdlib/unicode_usage.html#id191467
%% Heuristic identification of UTF-8
-check_utf8(Unframed = #ws_frame_info{opcode = text, data=Bin})
+check_utf8(Unframed = #ws_frame_info{opcode=text, data=Bin})
when is_binary(Bin) ->
case unicode:characters_to_binary(Bin,utf8,utf8) of
Bin ->
@@ -341,12 +341,12 @@ ws_frame_info(#ws_state{sock=Socket},
{ws_frame_info_secondary, Length, MaskingKey, Payload, Excess}
= ws_frame_info_secondary(Socket, Len1, Rest),
FrameInfo = #ws_frame_info{fin=Fin,
- rsv=Rsv,
- opcode=opcode_to_atom(Opcode),
- masked=Masked,
- masking_key=MaskingKey,
- length=Length,
- payload=Payload},
+ rsv=Rsv,
+ opcode=opcode_to_atom(Opcode),
+ masked=Masked,
+ masking_key=MaskingKey,
+ length=Length,
+ payload=Payload},
{FrameInfo, Excess};
Other ->
Other
Please sign in to comment.
Something went wrong with that request. Please try again.