Coder Social home page Coder Social logo

Comments (2)

xplicit avatar xplicit commented on September 22, 2024

Can you provide a reproducible case (application and configs), so I can look what is wrong?

from hyperfastcgi.

tarkin000 avatar tarkin000 commented on September 22, 2024

Reflect.cs (it's a bad name, has nothing to do with reflection)

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Newtonsoft.Json;
using HyperFastCgi;
using HyperFastCgi.AppHosts.Raw;
using HyperFastCgi.Interfaces;

namespace Reflect {
  public class PeekRequest : BaseRawRequest {
    public override void Process(IWebResponse response) {
      string json;
      if (ServerVariables == null || ServerVariables.Count == 0) {
        json = "null";
      } else {
        json = JsonConvert.SerializeObject(ServerVariables,Formatting.Indented);
      }
      Status = 200;
      StatusDescription = "OK";
      ResponseHeaders.Add("Content-Type","application/json");
      response.Send(Encoding.UTF8.GetBytes(json));
      response.CompleteResponse();
    }
  }
}

And hyper.config:

<!-- vim: set ft=xml: -->
<configuration>
  <server type="HyperFastCgi.ApplicationServers.SimpleApplicationServer">
    <host-factory>HyperFastCgi.HostFactories.SystemWebHostFactory</host-factory>
    <threads min-worker="40" max-worker="0" min-io="4" max-io="0"/>
    <root-dir>/opt/hyper</root-dir>
  </server>
  <listener type="HyperFastCgi.Listeners.NativeListener">
    <apphost-transport type="HyperFastCgi.Transports.NativeTransport">
      <multithreading>ThreadPool</multithreading>
    </apphost-transport>
    <protocol>Unix</protocol>
    <address>/var/tmp/hyper.sock</address>
  </listener>
  <apphost type="HyperFastCgi.AppHosts.Raw.RawHost">
    <log level="All" write-to-console="true" />
    <add-trailing-slash>false</add-trailing-slash>
    <request-type>Reflect.PeekRequest,Reflect</request-type>
  </apphost>
</configuration>

Mono:
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 14 12:30:00 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

Machine:
Linux vm1 3.2.0-4-amd64 #1 SMP Debian 3.2.82-1 x86_64 GNU/Linux
(7 / Wheezy)

from hyperfastcgi.

Related Issues (20)

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.