Code Monkey home page Code Monkey logo

node-cuipp's People

Contributors

ivansanchez avatar kalibuchi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

node-cuipp's Issues

Catch bad XML responses from /CGI/Execute

Do some error control around parser.parseString() in cuipp.send(). Some phones might return plain HTML if something goes wrong (e.g. bad password or bad HTTP headers)

Catch timeouts from HTTP requests

Some phones hang up the HTTP request without giving a timeout. The phone establishes the TCP connection (SYN, SYN/ACK, ACK), node sends the HTTP request, and the phone acknowledges receipt of the TCP packet with the HTTP request... but hangs up there.

There must be some way to set up an artificial timeout in Node to catch this scenario and let node-cuipp return a custom error.

All requests must NOT use Transfer-encoding: chunked

TODO: Add a content-length HTTP header to all calls in cuipp.send(), and replicate headers sent by applications known to work, e.g.:

        headers: {
            'content-type': 'text/xml; charset:ISO-8859-1',
            'MessageType': 'CALL',
            'Accept': '*/*',
            'Man': 'POST http://' + phone.host + ':' + phone.port + '/CGI/Execute HTTP/1.1',  // WTF????
            /// Content length is needed; embedded web server will return 404 
            ///   if content is sent with Transfer-encoding: chunked.
            'Content-length': xml.length + 4    
            },

Proper ISO-8859-1 support

Ensure that UTF-8 inside the .js files is converted into ISO-8859-1 into the XML payloads, in a transparent manner.

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.