Git Product home page Git Product logo

madfish-webtoolkit's People

Stargazers

 avatar  avatar

Forkers

dmpas

madfish-webtoolkit's Issues

Very inefficient counter increment.

Code in Server.cpp:
        clientsMutex.Lock();
        clientsCount++;
        clientsMutex.Unlock();

Why don't use an atomic operations? Such as InterlockedIncrement on win32

Original issue reported on code.google.com by [email protected] on 8 Jun 2009 at 5:36

Missing file..

You seem to have forgotten to add a file to your repository..
My guess is that it is called Logger.cpp

Original issue reported on code.google.com by [email protected] on 19 Jun 2009 at 9:14

Does not compile with GCC on windows

I am using 32 bit Windows XP and mingw.
Does not compile with the GCC compiler.


1. Create an empty c++ project in the codeblocks ide (or any other tool you
like).
2. Add the files of the WebToolkit to the project.
3. Add the WIN32 symbol to the project settings.


The compiler produces the following :

-------------- Build: Debug in WebToolkit ---------------

Compiling: File.cpp
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp: In
member function `std::string File::ReadLine()':
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:45:
warning: comparison between signed and unsigned integer expressions
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:55:
warning: comparison between signed and unsigned integer expressions
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp: In
member function `void File::Seek(i64)':
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:94:
error: `_fseeki64' was not declared in this scope
C:\Storage\Code_blocks_projects\WebCpp\WebToolkit\WebToolkit\File.cpp:94:
warning: unused variable '_fseeki64'
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 3 warnings
-----------------------------


The compiler finds neither "_fseeki64", nor "fseeko" function.
Seems like your 
    #ifdef WIN32 
can be replaced with 
    #ifdef _MSC_VER
or
    #if __MSVCRT_VERSION__ >= 0x800 //See <stdio.h>
and actually specifies compiler dependent options instead of the OS
dependent ones.



You could also consider using platform and compiler independent functions
like "fseek" instead of "_fseeki64" and "fseeko".


Original issue reported on code.google.com by [email protected] on 8 Jun 2009 at 3:12

Cannot build under MS VS2005/WinXP

* What steps will reproduce the problem?
1. Cmake under Visual Studio 2005 with steps in Wiki
2. Build All

* What is the expected output? What do you see instead?
I've expected all is built, but compiler shows error:

------ Build started: Project: CoreToolkit, Configuration: Debug Win32 ------
Compiling...
Thread.cpp
..\..\CoreToolkit\Thread.cpp(153) : error C3861: 'SignalObjectAndWait': 
identifier not found
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\CoreToolkit\CoreToolkit.dir
\Debug\BuildLog.htm"
CoreToolkit - 1 error(s), 0 warning(s)
------ Build started: Project: ImageBoard, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 
'..\CoreToolkit\Debug\CoreToolkit.lib'
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\ImageBoard\ImageBoard.dir\D
ebug\BuildLog.htm"
ImageBoard - 1 error(s), 0 warning(s)
------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 
'..\CoreToolkit\Debug\CoreToolkit.lib'
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\HelloWorld\HelloWorld.dir\D
ebug\BuildLog.htm"
HelloWorld - 1 error(s), 0 warning(s)
------ Build started: Project: FileServer, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 
'..\CoreToolkit\Debug\CoreToolkit.lib'
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\FileServer\FileServer.dir\D
ebug\BuildLog.htm"
FileServer - 1 error(s), 0 warning(s)
------ Build started: Project: SessionDemo, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 
'..\CoreToolkit\Debug\CoreToolkit.lib'
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\SessionDemo\SessionDemo.dir
\Debug\BuildLog.htm"
SessionDemo - 1 error(s), 0 warning(s)
------ Build started: Project: SimpleBlog, Configuration: Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file 
'..\CoreToolkit\Debug\CoreToolkit.lib'
Build log was saved at "file://d:\Windows CE 
Tools\webtoolkit\madfish-webtoolkit-1.1\WebAppBuilds\SimpleBlog\SimpleBlog.dir\D
ebug\BuildLog.htm"
SimpleBlog - 1 error(s), 0 warning(s)
------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------
Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 6 failed, 2 up-to-date, 1 skipped ==========

* What version of the product are you using? On what operating system?
madfish-webtoolkit-1.1.tar.gz 
trying on WinXP




Original issue reported on code.google.com by [email protected] on 15 Dec 2010 at 1:28

Segmentation Fault

>>What steps will reproduce the problem?
1. I've installed and compiled hello world on Ubuntu using provided
instructions.
2. It worked fine for tests from browser
3. Then I ran free test on http://loadimpact.com/
4. On 30-users test i've got segmentation fault at serverside.


>>What version of the product are you using? On what operating system?
Version of your software is 1.0
The target OS is Ubuntu 8.04.1

>>Please provide any additional information below.
Thanks for great product!


Original issue reported on code.google.com by [email protected] on 16 Jun 2009 at 9:41

For urls with partially matched names dispatcher always calls method registered for shorter

Sorry, not even sure if this project is at least partially supported so I just 
leave here short description and solution... Just in case.

So, for urls like /url and /url1 no mater what you add for mapping allways will 
be called method mapped for /url
dispatcher.AddMapping("/url", HttpPost, new 
HttpHandlerConnector<VoteServer>(this,&VoteServer::urlMethod), true);
dispatcher.AddMapping("/url1", HttpPost, new 
HttpHandlerConnector<VoteServer>(this,&VoteServer::url1Method), true);
So if I access http://serverip:serverport/url1 VoteServer::url1Method will be 
called. 

This happens cause URIDispatcher::Handle method checks length bla bla bla you 
know it yourself. So there is a very easy solution. Cause map orders methods by 
string length (actually alphabetically but whatever) and url is actually 
dispatchMap key reversing dispatchMap iteration solves everything. Methods are 
now iterated from longest to shortest. 

So here are the fixes. Basically I just changed iterator to reverse_iterator 
and begin() end() to rbegin() rend(). And just in case made the same changes 
for HostDispatcher.


void HostDispatcher::Handle(HttpServerContext* context)
{
    for(map<string,Mapping>::reverse_iterator iter=dispatchMap.rbegin();iter!=dispatchMap.rend();iter++)
    {
        if((context->requestHeader.host.length()>=iter->first.length())&&(context->requestHeader.host.compare(context->requestHeader.host.length()-iter->first.length(),iter->first.length(),iter->first)==0))
        {
            context->requestHeader.host.erase(context->requestHeader.host.length()-iter->first.length());
            if(context->requestHeader.host[context->requestHeader.host.length()-1]=='.')
                context->requestHeader.host.resize(context->requestHeader.host.length()-1);
            Invoke(iter->first,context);
            return;
        }
    }
    if(!defaultHandler.empty())
        Invoke(defaultHandler,context);
    else
        throw HttpException(HttpNotFound,"Not found.");
}

void URIDispatcher::Handle(HttpServerContext* context)
{
    for(map<string,Mapping>::reverse_iterator iter=dispatchMap.rbegin();iter!=dispatchMap.rend();iter++)
    {
        if((context->requestHeader.resource.length()>=iter->first.length())&&(context->requestHeader.resource.compare(0,iter->first.length(),iter->first)==0))
        {
            context->requestHeader.resource.erase(0,iter->first.length());
            Invoke(iter->first,context);
            return;
        }
    }
    if(!defaultHandler.empty())
        Invoke(defaultHandler,context);
    else
        throw HttpException(HttpNotFound,"Not found.");
}

Hope this will help...

Good luck!

Original issue reported on code.google.com by [email protected] on 29 May 2013 at 11:57

Compiling on CodeBlocks (MinGW) under Windows

What steps will reproduce the problem?
1. Add all files to emptu progect.
2. Try compile HelloWorld example.
3.

What is the expected output? What do you see instead?
See many error messages:
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x7d)|
|undefined
reference to `_select@20'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x8e)|
|undefined
reference to `___WSAFDIsSet@8'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x130)
||undefined
reference to `_send@16'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x340)
||undefined
reference to `_recv@16'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x545)
||undefined
reference to `_closesocket@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x685)
||undefined
reference to `_closesocket@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xa84)
||undefined
reference to `_socket@12'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xae2)
||undefined
reference to `_setsockopt@20'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xb04)
||undefined
reference to `_htons@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xb18)
||undefined
reference to `_inet_addr@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xb3e)
||undefined
reference to `_bind@12'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0xb6d)
||undefined
reference to `_listen@8'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x10c4
)||undefined
reference to `_socket@12'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1122
)||undefined
reference to `_setsockopt@20'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1144
)||undefined
reference to `_htons@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1158
)||undefined
reference to `_inet_addr@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x117e
)||undefined
reference to `_bind@12'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x11ad
)||undefined
reference to `_listen@8'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x188d
)||undefined
reference to `_accept@12'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1906
)||undefined
reference to `_inet_ntoa@4'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1ba9
)||undefined
reference to `_WSAStartup@8'|
obj\Release\madfish-webtoolkit-1.1\CoreToolkit\Socket.o:Socket.cpp:(.text+0x1bc1
)||undefined
reference to `_WSACleanup@0'|
||=== Build finished: 22 errors, 15 warnings ===|


What version of the product are you using? On what operating system?
OS: Windows 2003SP2, CodeBlocks 8.02 with MinGW

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 Sep 2009 at 4:50

Have a project ready that uses WebToolkit - need author/licensing text placed into source

madfish,
  WebToolkit is perfect for a project that I am working on involving a
TiddlyWiki backend, which I will be hopefully publishing on code.google
within the next few weeks.
  I noticed that there is no author or licensing info in the source - so
not comfortable using your code without giving proper credit and publishing
some license verbiage in the source. Appears to be under the MIT license
but not sure.
  Also, I have built a Visual Studio 2008 solution of FileServe which makes
a FileServe.exe. In the solution WebTookit is a sub-project configured to
generate a static library - which the main FileServe links to.  Will send
all this stuff to you, or I can put it out on my public svn address.  Don't
have a way to contact you :( - my email is mailto:[email protected]
  Finally, while working your code - I commented a fair amount of it with
doxygen.  When that is complete will package all this up send that to you
as well.
  Eagerly waiting for your reply...
deepieni

Original issue reported on code.google.com by [email protected] on 12 Aug 2009 at 3:14

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.