Giter Site home page Giter Site logo

gmod-chttp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmod-chttp's Issues

"Couldn't load module library" on CentOS 7

Hey, I want to open an issue since I have an issue with cHTTP and the addon Billy's Logs which is a paid addon of gmodstore.com that works with cHTTP for making Discord webhooks work with the logs.

And the issue is that I can't share any private code without the author permission.

The issue happens when cHTTP is present, when is not, the addon starts just fine, but when it is present it throws a lot of lua errors. I told the developer about this issue and he said that it was issue with cHTTP that it's broken.

If you need more info I would be very happy to provide it, but I can't share private code

Sending _GET and _POST in one request does not work

Hello,
in one of my addons I automatically use CHTTP if it is installed and otherwise I use the normal gmod HTTP implementation. Turns out, people have been complaining about a post request not working when CHTTP is installed. Uninstalling it fixes it. The only odd thing I notice about the request is, it uses both - _GET and _POST

ex:

function http.CPost( url, params, onsuccess, onfailure, header )
	local request = {
		url			= url,
		method		= "post",
		parameters	= params,
		headers		= header or {},

		success = function( code, body, headers )

			if ( !onsuccess ) then return end

			onsuccess( body, body:len(), headers, code )

		end,

		failed = function( err )

			if ( !onfailure ) then return end

			onfailure( err )

		end
	}

	OurHTTP( request )
end

    local data = {}

    for k, v in pairs(player.GetHumans()) do
        table.insert(data, {v:Name(), v:SteamID64(), v:TimeConnected()})
    end


    local curip = game.GetIPAddress()
    local iptbl = string.Explode(":", curip)

    local post = {
        key = serverkey,
        address = curip,
        ip = iptbl[1],
        port = iptbl[2],
        hostname = GetHostName(),
        gamemode = engine.ActiveGamemode(),
        map = game.GetMap(),
        players = util.TableToJSON(data),
        max_players = tostring(game.MaxPlayers())
    }

    local url = website .. "/index.php?/api/servers/update"

    http.CPost(url, post, function( result )
            print('\n---LeyScreenCap.SendServerInfo---')
            print('url: '..url)
            print(result)
            print('---END---\n')
    end, function( err )
            print('\n---LeyScreenCap.SendServerInfo (error)---')
            print('url: '..url)
            print(err)
            print('---END---\n')
    end)

Use schannel instead of OpenSSL on Windows

If using a libcurl build with OpenSSL on Windows, we have to provide quite a few additional libraries and a CA bundle.

When using Windows' schannel, we will be able to use the built-in SSL extensions and rely on the internal CA store, providing better integration.

Offer a non-joined list of headers

ISteamHTTP joins headers using , if multiple headers with the same name are sent. However, this prevents us from easily splitting the header again if the header value already contains ,. Look into providing a non-joined list of headers without breaking compatibility.

Missing Libraries

Greetings,

Recently I have the problem that for some reason the latest version of gmod-chttp ceases to function on my server.
So I went ahead and took the version before the latest one (1.3.2) and everything went fine.

Using the 1.4.0-rc1 causes the gmsv_chttp_linux.dll to not work.
I contacted the server host support in a hope that they know what the issue would be. They told me to ask you what dependencies or libraries 1.4.0-rc1 needs to properly function.

Cheers,
Andre19926

Deadlock in TLS/HTTPS connections on CentOS 7

Hello there!

When I'm installing Linux 64 version.DLL - bLogs require just Linux version of DLL
When I'm installing Linux version.DLL - it's giving me an error. Attaching screenshot below
When i'm installing Linux-Static.DLL ( obviously with -static delete ), no errors given, but the logs doesn't come to Discord via webhook use.

OC host:

centos-release-7-9.2009.1.el7.centos.x86_64
Linux vps32594 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64 x86_64 x86_64 GNU/Linux

изображение

Not Working on Ubuntu 16.04

Hey, so I cant get it to work on my machine thats running Ubuntu 16.04. Regardless of which dll I use(normal 32bit and 32bit debian) it tells me: "Can't load module library". Can anyone help me out here?

Missing librairies

I got that in my console after adding gmsv_chttp to link my discord to bLogs.

[GmodAdminSuite] [WARN] [bLogs] Could not load gmsv_chttp!
[GmodAdminSuite] [WARN] [bLogs] There are some missing libraries from your server's operating system.
[GmodAdminSuite] [WARN] [bLogs] This is not the fault of bLogs!!

I'm using Linux x64 on a VPS Ubuntu 10

Random crashes since CHTTP version 1.4.3 (and later)

Since upgrading the module to version 1.4.3 and then 1.4.5, I've been experiencing numerous crashes when using the HTTP functions to communicate with webhooks on my Discord server (especially to signal the launch and shutdown of the server).

When using version 1.4.3, it was impossible for me to communicate with my webhook and caused a game crash when I disconnected from a P2P session or a private server (related to ShutDown hook ?). However in 1.4.5, the situation has improved because my webhook seems to work correctly at server startup but when I shutdown the server or my game in singleplayer, I simply crash.

For information, my game and my local server use Windows and Garry's Mod in 32-bit version (public branch). Here is one of the many crash dumps I can have : crash.zip

If the crashdump is not enough for you I can gladly give you some code to reproduce this issue.

Decide on header case-sensitivity behavior

While this should still be compatible with the Garry's Mod-internal HTTP method, we can probably make it a bit easier for developers to ensure that they have case-sensitivity-correct behavior (which is "don't assume any case-sensitivity", at least until upstream changes their behavior).

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.