The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,762 other followers

Archive for the ‘Web Development’ Category

When LinkedIn throws HTTP result code 999 at you it means it does not like you

Posted by jpluimers on 2019/10/23

LinkedIn is very private about itself which means you have a hard time linking to their content.

Too bad, as they make themselves an island.

I sorted this out a while ago to see why the Press-This and other bookmarking functionalities in web-browsers would fail for LinkedIn:

[WayBackWordPress/press-this: Linked-In URLs do not parse correctly

@kraftbj I found the below ones on StackOverflow and a general sentiment from https://www.google.com/search?q=linkedin%20999%20response is “Using the invalid HTTP response 999, LinkedIn blocks vary over time depending on both UserAgent and IP address blocks including many hosting and cloud service providers”.

–jeroen

Posted in Development, Software Development, Web Development | Leave a Comment »

Research list: haproxy and Connection: close

Posted by jpluimers on 2019/09/24

At a site, haproxy was configured like this for a particular back-end:

backend http_FUNCTIONALITY_cluster
    log global
    mode http
# default httpchk checks / which for our functionality intentionally returns 500 causing haproxy to think it's down
#   option httpchk
# FUNCTIONALITY has a /FUNCTIONALITY which returns a 200 OK
    option httpchk get /FUNCTIONALITY
    http-check expect ! rstatus ^5
    option http-keep-alive
    option forwardfor
    server w7connexxion 192.168.178.42:8181 cookie FUNCTIONALITYA check

The /FUNCTIONALITY would return a multi-kilobyte result.

The HAproxy would send the request with this body:

Connection: close

In the midst of the server returning an http request of more than one TCP frame:

Connection: close
Content-Type: text/html; charset=utf-8
Content-Length: 4068
Date: Mon, 20 Nov 2017 08:17:02 GMT

<html><head><META ...

, the HAproxy would kill the connection, resulting in a 10054 error on Windows, which [WayBack] Windows Sockets Error Codes indicates it is this:

WSAECONNRESET
10054
Connection reset by peer.

An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

So both sides are right in that they will close the connection (despite the HTTP keep alive): [WayBack] What does “Connection: close” means when used in the response message?

Howver, I think HAproxy is way too soon closing the connection, especially as it does not use the configured keep alive ([WayBack] How to make HA Proxy keepalive and [WayBack] Hypertext Transfer Protocol — HTTP/1.1 RFC 2616 = 14 Header Field Definitions – 14.10 Connection).

The 10054 would end up in the Windows Event Log for Applications like this:

The description for Event ID 0 from source MyFunctionality.exe cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

Socket Error # 10054
Connection reset by peer.

In the mean time, we shortened the result, so it does not fail any more.

Later I hope to find some time to do more research on this, for which I hope [WayBack] Health checking – HAProxy Technologies is a base.

–jeroen

Posted in Development, Software Development, Web Development | Leave a Comment »

CSS flex-box layout – Wikipedia

Posted by jpluimers on 2019/09/02

Being a back-end and library person by heart, I am always late in the web-UI game, so this is on my list of things to try: CSS flex-box layout – Wikipedia.

I saw it being used by [WayBack] markdownlint demo: Demo for markdownlint, a Node.js style checker and lint tool for Markdown/CommonMark files.

Some links that should me help further:

–jeroen

Read the rest of this entry »

Posted in CSS, Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

Links for another crazy idea: superimpose lane availability indicators on Google Maps

Posted by jpluimers on 2019/08/29

ANWB can superimpose the lane availability indicators on their internap maps software.

Some links so I won’t forget:

–jeroen

Read the rest of this entry »

Posted in Development, Google, GoogleMaps, Power User, Software Development, Web Development | Leave a Comment »

ls colour codes on OpenSuSE tumbleweed when accessed from Mac OS X ssh

Posted by jpluimers on 2019/06/07

`ls` colour codes

`ls` colour codes

I got confused as I thought red text would mean an error.

But they’re not: greenish yellow on a read background means error (a symbolic link to a place that’s no longer there).

It’s the output of https://github.com/gkotian/gautam_linux/blob/master/scripts/colours.sh as the one at

Actually the script is here https://raw.githubusercontent.com/gkotian/gautam_linux/master/scripts/colours.sh as the one at [WayBackcommand line – What do the different colors mean in the terminal? – Ask Ubuntu failed with errors like this one:

-bash: *.xbm: bad substitution

The full script output is below.

Since various terminals have a different mapping from colours in the ANSI escape code colour table, I used the standard HTML colours using (which slightly differs from the Terminal.app screenshot on the right):

References:

Note that the shell on Mac OS X uses a different way of configuring colours CLICOLOR as described in [WayBacksettings – CLICOLOR and LS_COLORS in bash – Unix & Linux Stack Exchange. I might cover that another day.

Script output:

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, CSS, Development, HTML, HTML5, Linux, openSuSE, Power User, Software Development, SuSE Linux, Tumbleweed, Web Development | Leave a Comment »

 
%d bloggers like this: