pl: Ein Proxy kennt kein NPH

Beitrag lesen

… und der Payload ist interessanter Weise kürzer als die angegebenen 30 Byte:

Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 30

Ja. Der Proxy war das. Der hat, hier widersinnig (weil mit größerem Ergebnis), den Content "gepackt". Schau mal, falls Du den verwaltest, in dessen Manual nach ob man das Packen unterhalb von 1k verbieten kann: Bringt dann faktisch nichts.

Deswegen ja ein NPH Script. Ein solches übern Proxy zu requesten ist völliger Blödsinn. Im Übrigen gibt es zum NTP praktisch gar keinen Unterschied in Sachen Performance. Natürlich auch nur wenn man einen minimalen HTTP Client darauf ansetzt:

my $so = IO::Socket::INET->new("rolfrost.de:80") or die $@;
$so->print("GET /cgi-bin/nph-time.cgi HTTP/1.0\nHost: rolfrost.de\n\n");
my $res = do{ local $/ = undef; <$so>};
my $t = [unpack "C19N", $res]; # Genau 23 Bytes hat die Response
my $gmt = [gmtime($t->[19])];  # Zeitstempel in den letzten 4 Bytes

und auch hier siehst Du den Vorteil von NPH: Die gesamte Response lässt sich damit bytegenau zusammenstellen und damit auch bytegenau dekodieren. Eben weil der Webserver die ungeparst durchreicht. Ein Proxy hingegen weiß ja gar nicht daß es ein NPH Script ist, der parst das und hängt eigene Header an.

MFG

PS: Bei 4 Bytes im Message Body gibt es nichts zu packen. Das ist schon gepackt. Im Übrigen wird HTTP/1.0 verwendet. Da gibt es gar keine Komprimierung die kam erst mit HTTP/1.1

0 107

ptbtime2.ptb.de 1-3 nicht erreichbar

pl
  • sonstiges
  1. 0
    ntp
    1. 0
      pl
      1. 0
        pl
        1. 0
          Patrick C.
          1. 0
            ntp
            1. 0
              Christian Kruse
            2. -1
              pl
              1. 0
                ursus contionabundo
                1. 0

                  Daytime Server mit IO::Socket

                  pl
                  • perl
                  1. 2

                    Alea iacta est!

                    Camping_RIDER
                    1. 0
                      pl
                      1. 1
                        Camping_RIDER
          2. 0
            pl
            1. 0
              Patrick C.
              1. 0
                pl
                1. 0
                  Patrick C.
                  1. 0
                    pl
                    1. 0
                      Patrick C.
                  2. 0
                    ursus contionabundo
                    1. 0
                      Patrick C.
                      1. 0
                        pl
                        1. 0
                          Patrick C.
                          1. 0
                            pl
  2. 0

    ptbtime2.ptb.de 1-3 per Ping nicht erreichbar - Aber ntpdate geht.

    ursus contionabundo
    1. 0
      pl
      1. 0
        ntp
        1. 0
          pl
          1. 1

            Das ist alles andere als eine gute Idee...

            ursus contionabundo
            1. 0
              pl
              1. 0
                Christian Kruse
                1. 0
                  pl
                  1. 0
                    Christian Kruse
                    1. 0
                      ursus contionabundo
                      1. 1
                        Christian Kruse
                      2. 0
                        pl
                        1. 2
                          ursus contionabundo
                          1. 0
                            pl
                  2. 0
                    pl
                    1. 2
                      ursus contionabundo
                      1. 0

                        NPH vs Daytime

                        pl
                        1. 3
                          ursus contionabundo
                          1. 0

                            TCP vs. UDP

                            pl
                            1. 2
                              ursus contionabundo
                    2. 0
                      Robert B.
                      • https
                      1. 0
                        pl
                        1. 1
                          ursus contionabundo
                          1. 0
                            pl
                            1. 0
                              Robert B.
                              1. 0
                                pl
                                1. 2

                                  Ein teuflisch gemein böser Rat ...

                                  ursus contionabundo
                                  • sonstiges
                                  1. 0
                                    pl
                                    1. 0
                                      ursus contionabundo
                                      1. 0
                                        pl
                                        1. 2
                                          Christian Kruse
                                          1. -1
                                            pl
                                            1. 0
                                              Christian Kruse
                                            2. 0
                                              Patrick C.
                      2. 0

                        Kleine Datenmengen packen ist auch nicht immer eine gute Idee.

                        ursus contionabundo
                        1. -1

                          Ein Proxy kennt kein NPH

                          pl
                          1. 0
                            ursus contionabundo
                            1. 0
                              pl
                          2. 0
                            Robert B.
                            1. 0
                              pl
                              1. 0
                                Robert B.
                        2. 0
                          Robert B.
                        3. 0
                          Robert B.
                          1. 0
                            pl
                        4. 0

                          Kleine Datenmengen packen ist auch nicht immer eine gute Idee. Siehe Accept-Encoding

                          pl
                          1. 1
                            Christian Kruse
                            1. 1
                              dedlfix
                            2. 0
                              pl
                              1. 0
                                Christian Kruse
                                1. 0
                                  pl
                                  1. 2
                                    Christian Kruse
                                  2. 1
                                    Robert B.
                                    1. 0
                                      pl
                                      1. 0
                                        Christian Kruse
                                        1. 0
                                          pl
                                          1. 0
                                            Robert B.
                                            • browser
                                            • https
                                            • menschelei
                                            1. 1
                                              Christian Kruse
                                      2. 0
                                        Robert B.
                                        • browser
                                        • https
                              2. 0
                                Robert B.
                                1. -1
                                  pl
            2. 0

              Das ist alles andere als eine gute Idee... Webservices

              pl
              1. 1
                dedlfix
                1. 0
                  pl
                2. 1
                  Tabellenkalk
                3. 0

                  NTP über HTTP, TCP vs. UDP

                  pl
                  • https
                  • sonstiges
                  • webserver
                  1. 1
                    dedlfix
                    1. 0
                      pl
                      1. 1
                        dedlfix
                  2. 0
                    pl
              2. 1
                Robert B.
                1. 0

                  Die Idee der Webservices

                  pl
  3. 0
    Wille
    1. 0
      pl
    2. 0
      Jollo
      1. -1

        NTP ist ähnlich aufgebaut wie DNS

        pl
  4. 0

    Uhrzeit als Webservice in JAVA

    pl
    1. 0
      ursus contionabundo
      1. 0
        Christian Kruse
        1. 0

          Uhrzeit als Webservice in JAVA fpr 15 Teilnehmer aber bitte mit einem dediziertem Tomcat-Server

          ursus contionabundo
        2. 1
          Robert B.
          1. 0
            dedlfix
            1. 0
              MudGuard
            2. 0
              Jollle