Mercurial > urweb
view demo/url.ur @ 2071:739172204214
Introduce recv timeout controlled by '-T' option in http.c
This should prevent a DDoS attack where attacker and keeps the connection open
but send no data.
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Tue, 02 Sep 2014 17:42:10 +0000 |
parents | 412ccd97ab71 |
children |
line wrap: on
line source
fun yourChoice r = return <xml><body> {case checkUrl r.Url of None => <xml>You aren't allowed to link to there.</xml> | Some url => <xml><a href={url}>Enjoy!</a></xml>} </body></xml> fun main () = return <xml><body> <a href="http://en.wikipedia.org/wiki/Type_inference">Learn something</a><br/> <br/> <form> URL of your choice: <textbox{#Url}/> <submit action={yourChoice}/> </form> </body></xml>