Giter VIP home page Giter VIP logo

cgilib's People

Contributors

adriangjerstad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cgilib's Issues

Add template parsing

Add the capability of users to load a template, generate a series of values for that template, populate, and send it off.

Naming conventions

Anything like the header class or others should not require you to have header in the name of the member.

For adding headers to a response, for example, you could use the following:

cgi::headers.add("Content-Type", "application/wasm");  // not add_header

Send static files

Make it possible to send static content from another file.

Justification:
Even though you could just have the server send the raw asset, it's useful to be able to set a few headers, or send different files entirely based on the input a client offers.

CGI Runtime Test Environment

Describe the solution you'd like
Create a system in which we are capable of generating input for MULTIPLE test cases in one file. This way, we have access to all of the functionality a real CGI environment would offer, just, outside of the context of a server.

Describe alternatives you've considered
There are various unit testing libraries out there, but none of them cover what would be required to do this.

Additional context
To start, we would need to clear the environment. Wipe all knowledge of environment variables from the test process. Then, get the ability to define certain metadata about the simulated request, such as request method and addresses. Offer the ability to give it HTTP headers, a request body, etc. Everything rfc3875 defines as required must be there. I'll put information on how to do these in C++ below, to get a rough idea of what is required.

Header index issues

When adding a new header, you receive an index to use to refer to that header. However, when you erase something from the vector, that has the chance to slide around. So if you then try to delete it, the result is some furious, fruitless debugging and some lost hair.

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.