inclusion of http error code in openlitespeed

#1
So I realized that openlitespeed does not seem to support all http error codes. Particularly, it doesn't seem to support all 4xx error codes.

I have provided proper support for the missing code here, but built in support would be great. Maybe I should open a ticket on the git repo....

This is the error code https://418.support/
 
#2
#3
But... It's always April 1st o' clock *somewhere*. Now that I bought a domain to support it. it's always good to have a little fun, especially when it comes to serving up hot n spicy html all day long.

And it seems pretty stable to me.

I think it would have been better if the code had read "short and stdout." though. It's now been corrected to that, in fact.
 
#4
Make your own fun. :)

Code:
<?php
http_response_code(418);

echo "<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>I'm a teapot</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            text-align: center;
            margin-top: 20%;
        }
        .teapot {
            font-size: 100px;
        }
    </style>
</head>
<body>
    <div class='teapot'></div>
    <h1>418 I'm a teapot</h1>
    <p>Sorry, I cannot brew coffee because I am a teapot!</p>
</body>
</html>";
?>
 
#5
Maybe this is the reason why this status code isn't available....
You are a litespeed developer? Or specific to the cache module?

Before opening a ticket on GitHub, I quickly thought I'd check.
Make your own fun. :)
<?php
http_response_code(418);
?>
I'll be sure to do that, and host it on polyfill CDN. What could go wrong?! (Note to unaware users: polyfill's CDN has been injecting malicious code into sites that use polyfill and CloudFlare has responded by automatically redirecting to their CDN after scrubbing the malicious code https://thehackernews.com/2024/06/over-110000-websites-affected-by.html )

On a side note, you are a developer with litespeed, Mr. Cache? Or specifically focused on the caching like lscache, lsmcd, etc?

Before I raise a GitHub ticket (tho maybe there is one already) for the current pull, compiling appears to break at libbroccoli. The cxxflags aren't finding the libraries for broccoli. apparently when the build.sh script configures for building openlitespeed binary. I usually lean toward "I'm doing something wrong" before deciding it's the repo code though.

(Replaced with image since code keeps breaking)

Any issue you're aware of? It's only with current 1.8.2 pull
 

Attachments

Last edited:
#9
Never! Tesla has copied it.... ;)
I love it!

Re: litecache, I see requirement are PHP < 8.2. is it only untested for 8.2+ or is it a breaking change with SPL in PHP 8.2? I'm running 8.3.9, but there are noticable speed enhancements from 8.2 to 8.3. I haven't tested 8.3 vs 8.1 though.

EDIT: sorry if I'm taking up your time. I appreciate it though!
 
#11
There is only compatibility for PHP 7.4 to 8.1. Support for PHP > 8.1 will only be possible at the end of this year because we also want to support PHP 8.3, which IonCube is currently unable to guarantee.
Great, thank you. There have been a lot of changes in PHP across the minor releases of 8.x. Thankfully I haven't experienced compatibility problems with CMS or plugins. I hate WordPress but I don't know CSS, JScript, PHP, or even HTML5 well enough to build my own websites. I need some of the advanced features that plugins offer. Maybe it's time to learn full stack
 
#14
I will check it! I compiled PHP-8.1.29 branch yesterday and installed it, I need to adjust my caches properly now to find the right mix. My server is 4 cores, 4gb ram. I'm hoping to move back to a dedicated server soon. I have lsmcd compiled and running, along with opcache. lscache plugin is installed on my vhosts with object caching set to lsmcd. Php is set as daemon startup with 1 instance and 35 max connections. 3 openlitespeed workers, also the built in cache module for OLS and modpagespeed. And CloudFlare caching in front of that. I need to reduce my caches a little.

2 of my sites are in development. 2 are live. One is static. One is WordPress but content remains unchanged (landing page with contact form)
 
Top