Skip to content

Instantly share code, notes, and snippets.

@qmacro
Created September 18, 2009 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qmacro/189000 to your computer and use it in GitHub Desktop.
Save qmacro/189000 to your computer and use it in GitHub Desktop.
New style ICF handler example - see http://github.com/qmacro/coffeeshop/blob/master/coffeeshop.py#L524 for comparison
method IF_HTTP_EXTENSION~HANDLE_REQUEST.
handler( p = '^/$' h = 'Y_COF_H_MAINPAGE' ).
handler( p = '^/channel/submissionform$' h = 'Y_COF_H_CHANSUBMITFORM' ).
handler( p = '^/channel/([^/]+)/subscriber/submissionform$' h = 'Y_COF_H_CHNSUBSUBMITFORM' ).
handler( p = '^/channel/([^/]+)/subscriber/$' h = 'Y_COF_H_CHNSUBCNT' ).
handler( p = '^/channel/([^/]+)/subscriber/([^/]+)/$' h = 'Y_COF_H_CHNSUB' ).
dispatch( server ).
endmethod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment