GithubHelp home page GithubHelp logo

tanzer's People

Contributors

angrylawyer avatar jean1 avatar johannish avatar patch avatar xantronix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tanzer's Issues

Tanzer throws an error when used through SCGI

How to reproduce :

cd /tmp
git clone http://tanzer.io/git/tanzer.git

I copied the "scgi.tcl" from the example directory
cd tanzer
cp examples/scgi.tcl S

I added this at the begining:
lappend auto_path /tmp/tanzer/lib/

Starting the script:
./S 9000 /tmp

Then I have an Nginx server configured in SCGI mode

location / {
include scgi_params;
scgi_pass localhost:9000;
}

Testing with "curl http://localhost" produces the following error from the script:

{can't use empty string as operand of "+"} can't use empty string as operand of "+"
while executing
"expr {
2
+ $headerLength
+ [string length $headerLength]}"
(class "::tanzer::scgi::request" method "parse" line 31)
invoked from within
"$request parse buffer"
(class "::tanzer::session" method "handle" line 41)
invoked from within
"$session handle $event"
("uplevel" body line 2)
invoked from within
"uplevel 1 $script"
127.0.0.1 - [Wed, 04 Sep 2015 22:40:18 GMT] "- HTTP/1.1" 500 1610 "-" "(unknown)"

Delete routes at runtime

Hi Alexandra,

I'd like to use tanzer for dynamic webservices with manipulation at runtime. So it is necessary for me to delete and destroy route entries from router object.

Perhaps it is useful and you may add a delete method like this:

oo::define ::tanzer::router method delete {entry} {
my variable entries;
set entries [lreplace $entries [lsearch $entries $entry] [lsearch $entries $entry]]
$entry destroy
}

When I destroy an entry object i even got an error:
(bin) 12 % [$server router] entries
::oo::Obj62 ::oo::Obj63
(bin) 13 % [$server router] deleteEntry ::oo::Obj62
::oo::Obj63
(bin) 14 % ::oo::Obj62 destroy
invalid command name "{} *"

Best regards!
André

Websocket support for Tanzer

Hi, I am trying to figure how to integrate the websocket library of tcllib to Tanzer. I am using Tanzer and a websocket server using the websocket library of tcllilb on my framework FireTcl.

https://sourceforge.net/projects/firetcl/

There is almost no example on internet about how to use the websocket library of tcllib. The code of the websocket server that I use on my framework is here:

firetcl/tcl/websocket_server.tcl. 

I use an object oriented approach.

I also made a very little modification to the websocket library of tcllib because otherwise it doesn't work:

firetcl/tcl/tcllib/websocket.tcl

I liked your framework. The code is clean.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.