From: Nicolas Boisselier Date: Sat, 26 May 2018 00:27:56 +0000 (+0100) Subject: etc/profile.d/nb.sh X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=2daeb26d98bd3189200127f78ca2d46e715fb4bc;p=nb.git etc/profile.d/nb.sh --- diff --git a/etc/profile.d/nb.sh b/etc/profile.d/nb.sh index ccc1b49a..18c782e9 100644 --- a/etc/profile.d/nb.sh +++ b/etc/profile.d/nb.sh @@ -83,10 +83,11 @@ nb_php() { nb_api() { local uri="$1"; shift + #echo "https://api.nbdom.net$uri $@"; return 0; if [ -z "$NB_AUTH" -o x = x$(awk '/^machine api.nbdom.net / { print $4":"$6}' $HOME/.netrc 2> /dev/null) ]; then - curl -su "$NB_AUTH" "https://api.nbdom.net$uri" "$@" + curl -sfS -u "$NB_AUTH" "https://api.nbdom.net$uri" "$@" else - curl -s --netrc-optional "https://api.nbdom.net$uri" "$@" + curl -sfS --netrc-optional "https://api.nbdom.net$uri" "$@" fi } @@ -107,6 +108,7 @@ nb_api_post() { fi ( eval "$(eval "$curl")" #&& echo "$table: $rowCount: $args" + #eval "$curl" #&& echo "$table: $rowCount: $args" ) } diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index e93d2b6e..48b56cb8 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -778,6 +778,8 @@ class DbQ extends nb { public function not_found($admin_msg='') { header('Content-type: text/plain'); $msg = '404 Not Found'; + #$msg = '510 Not Implemented'; + $msg = '400 Bad Request'; if (empty($_SERVER['SERVER_PROTOCOL'])) $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';