Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Farook Al-Sammarraie
    @The-EDev
    actually "If you are using version 0.3" only would suffice since 0.2 did not have CROW_MAIN
    Luca Schlecker
    @luca-schlecker
    Oh, interesting. Ok, then I'll just write "If you are using version v0.3 ..."
    And for the README, should I put it inside the ## Disclaimer region?
    Farook Al-Sammarraie
    @The-EDev
    umm, no, I think above the first example would be best
    Luca Schlecker
    @luca-schlecker
    Updated the PR, what do you think @The-EDev?
    Farook Al-Sammarraie
    @The-EDev
    All good, thanks a lot for all the work
    Luca Schlecker
    @luca-schlecker
    You're welcome, I am happy to help.
    Luca Schlecker
    @luca-schlecker
    @The-EDev By the way, if I wanted to introduce a function inside App that'd return whether or not SSL is being used, it would be callable regardless of SSL being enabled or not, wouldn't it? (Similar to bool compression_used() const)
    Farook Al-Sammarraie
    @The-EDev
    I mean, in order for it to return that SSL isn't being used it would have to operate without it being enabled right?
    Luca Schlecker
    @luca-schlecker
    Also that, but one could enable SSL through CMake but not end up using it, which should then also return false. The variable use_ssl_ already does this, but just like there are stubs for .ssl() and .ssl_file(), there should also be a stub for .ssl_used() const.
    Anyway, I'll fix a bug I've encountered having to do with SSL redirection. If SSL is enabled, but not used, one would still always be redirected to https:// leading to broken webpages (at least for me).
    Farook Al-Sammarraie
    @The-EDev
    That's interesting
    I'm pretty sure Crow doesn't do any redirection
    at least when it comes to SSL, either that or I'm completely forgetting stuff here
    Luca Schlecker
    @luca-schlecker
    There actually is some stuff going on:
    //if there is a redirection with a partial URL, treat the URL as a route.
    std::string location = res.get_header_value("Location");
    if (!location.empty() && location.find("://", 0) == std::string::npos)
    {
    #ifdef CROW_ENABLE_SSL
        location.insert(0, "https://" + req_.get_header_value("Host"));
    #else
        location.insert(0, "http://" + req_.get_header_value("Host"));
    #endif
        res.set_header("location", location);
    }
    Luca Schlecker
    @luca-schlecker
    It has to do with response::redirect and response::redirect_perm.
    Farook Al-Sammarraie
    @The-EDev
    I finally got the clang format script to fully work
    Farook Al-Sammarraie
    @The-EDev
    I just posted about creating a blog for Crow, any ideas / suggestions ?
    legendaryzyper
    @legendaryzyper
    when will crow be available for visual studio 2022?
    Farook Al-Sammarraie
    @The-EDev
    @legendaryzyper did you encounter any problems compiling a Crow project in VS2022?
    Luca Schlecker
    @luca-schlecker
    I already successfully compiled a Crow project using VS2022. Should just work. 👍
    legendaryzyper
    @legendaryzyper
    weird I got build errors saying that cant build under v143
    Luca Schlecker
    @luca-schlecker
    Are you using vcpkg?
    legendaryzyper
    @legendaryzyper
    i built manually from source
    Luca Schlecker
    @luca-schlecker
    Weird... Could you please provide some more information about what errors are occuring.
    legendaryzyper
    @legendaryzyper
    wait im reinstalling vs2022
    Luca Schlecker
    @luca-schlecker
    Where did you get your depentencies from? (Boost)
    legendaryzyper
    @legendaryzyper
    vcpkg
    Luca Schlecker
    @luca-schlecker
    I ran into the problem that I had to manually upgrade my Boost installation from 1.75 to the latest.
    That's probably where your problem is coming from.
    So everything should work out for you if you upgrade boost. 👍
    legendaryzyper
    @legendaryzyper
    ok let me try
    wait a minute...
    now its working
    what the hell
    Luca Schlecker
    @luca-schlecker
    Older Boost versions have a problem compiling with the VS2022 (at least through VCPKG).
    But I'm glad it works now. 🎉
    legendaryzyper
    @legendaryzyper
    awesome framework btw
    thumbs up to the devs
    Luca Schlecker
    @luca-schlecker
    Thanks, we're (I guess I may speak for all of us here) glad to hear it. 😊
    legendaryzyper
    @legendaryzyper
    what does mustache::set_base() do?
    Farook Al-Sammarraie
    @The-EDev
    it sets the directory where your templates will be placed in, the default directory is "templates/"
    legendaryzyper
    @legendaryzyper
    thanks
    so the "." is using the default dir right
    Farook Al-Sammarraie
    @The-EDev
    no, "./templates" is the default dir
    legendaryzyper
    @legendaryzyper
    hmm i used set_base("./my_dir") and put my htmls in "my_dir" but crow still cant find them
    Farook Al-Sammarraie
    @The-EDev
    try set_base("my_dir")
    legendaryzyper
    @legendaryzyper
    hmm still doesnt work either
    i noticed that even if i changed set_base then crow still search in "./templates"
    Farook Al-Sammarraie
    @The-EDev
    interesting