
module Pusher module Async class << self def spawn Thread.new { EM.run } unless EM.reactor_running? end def respawn EM.stop if EM.reactor_running? spawn end end end class Request alias :send_async_without_next_tick :send_async def send_async df = EM::DefaultDeferrable.new EM.next_tick do send_async_without_next_tick .callback{ |response| df.succeed(response) } .errback{ |error| df.fail(error) } end df end end end charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .  charset   UTF-8 . 
 
 <script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script> 
 
        ,  ""    ,         ,     .   β  , ,   ,      β @charset . 
      ,         ,        . 
 
 <style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style> 
 
  , ,  ,   , β     ,          UTF-8,             ,    . 
 
 <form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form> 
 
 HTTPβ 
  ,       , β    ,   β     . 
 
  ,        , ,  β    X-Frame-Options , X-Content-Type-Options  X-XSS-Protection ,    Content-Type   . 
 
       . Firefox, ,       ,      Access-Control-Allow-Origin: * 
 
  
 ,      ,      , ,  ,    . 
 
     , ,    ,            .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .  charset   UTF-8 . 
 
 <script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script> 
 
        ,  ""    ,         ,     .   β  , ,   ,      β @charset . 
      ,         ,        . 
 
 <style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style> 
 
  , ,  ,   , β     ,          UTF-8,             ,    . 
 
 <form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form> 
 
 HTTPβ 
  ,       , β    ,   β     . 
 
  ,        , ,  β    X-Frame-Options , X-Content-Type-Options  X-XSS-Protection ,    Content-Type   . 
 
       . Firefox, ,       ,      Access-Control-Allow-Origin: * 
 
  
 ,      ,      , ,  ,    . 
 
     , ,    ,            .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .  charset   UTF-8 . 
 
 <script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script> 
 
        ,  ""    ,         ,     .   β  , ,   ,      β @charset . 
      ,         ,        . 
 
 <style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style> 
 
  , ,  ,   , β     ,          UTF-8,             ,    . 
 
 <form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form> 
 
 HTTPβ 
  ,       , β    ,   β     . 
 
  ,        , ,  β    X-Frame-Options , X-Content-Type-Options  X-XSS-Protection ,    Content-Type   . 
 
       . Firefox, ,       ,      Access-Control-Allow-Origin: * 
 
  
 ,      ,      , ,  ,    . 
 
     , ,    ,            .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .charset UTF-8 .
<script src="http://example.com/script_in_unicode.js" charset="UTF-8"></script>
, "" , , . β , , , β @charset .
, , .
<style type="text/css"> @charset "UTF-8"; .breadcrumbs li:before { content: "β"; } .breadcrumbs li:first-child:before { content: ""; } </style>
, , , , β , UTF-8, , .
<form action="http://example.com/comments" method="post" target="hidden-iframe" enctype="application/x-www-form-urlencoded;charset=UTF-8" accept-charset="UTF-8"> <textarea name="body"></textarea> </form>
HTTPβ
, , β , β .
, , , β X-Frame-Options , X-Content-Type-Options X-XSS-Protection , Content-Type .
. Firefox, , , Access-Control-Allow-Origin: *
, , , , , .
, , , .Source: https://habr.com/ru/post/175753/
All Articles