mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-23 16:59:54 +08:00
Merge branch 'sync'
This commit is contained in:
commit
8d58d5d34f
1649
oc2/daptab.c
1649
oc2/daptab.c
File diff suppressed because it is too large
Load Diff
88
oc2/daptab.h
88
oc2/daptab.h
@ -1,19 +1,19 @@
|
||||
/* A Bison parser, made by GNU Bison 3.0.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.5. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
@ -26,62 +26,54 @@
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_DAP_DAP_TAB_H_INCLUDED
|
||||
# define YY_DAP_DAP_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 1
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int dapdebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
SCAN_ALIAS = 258,
|
||||
SCAN_ARRAY = 259,
|
||||
SCAN_ATTR = 260,
|
||||
SCAN_BYTE = 261,
|
||||
SCAN_CODE = 262,
|
||||
SCAN_DATASET = 263,
|
||||
SCAN_DATA = 264,
|
||||
SCAN_ERROR = 265,
|
||||
SCAN_FLOAT32 = 266,
|
||||
SCAN_FLOAT64 = 267,
|
||||
SCAN_GRID = 268,
|
||||
SCAN_INT16 = 269,
|
||||
SCAN_INT32 = 270,
|
||||
SCAN_MAPS = 271,
|
||||
SCAN_MESSAGE = 272,
|
||||
SCAN_SEQUENCE = 273,
|
||||
SCAN_STRING = 274,
|
||||
SCAN_STRUCTURE = 275,
|
||||
SCAN_UINT16 = 276,
|
||||
SCAN_UINT32 = 277,
|
||||
SCAN_URL = 278,
|
||||
SCAN_PTYPE = 279,
|
||||
SCAN_PROG = 280,
|
||||
WORD_WORD = 281,
|
||||
WORD_STRING = 282
|
||||
};
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
SCAN_ALIAS = 258,
|
||||
SCAN_ARRAY = 259,
|
||||
SCAN_ATTR = 260,
|
||||
SCAN_BYTE = 261,
|
||||
SCAN_CODE = 262,
|
||||
SCAN_DATASET = 263,
|
||||
SCAN_DATA = 264,
|
||||
SCAN_ERROR = 265,
|
||||
SCAN_FLOAT32 = 266,
|
||||
SCAN_FLOAT64 = 267,
|
||||
SCAN_GRID = 268,
|
||||
SCAN_INT16 = 269,
|
||||
SCAN_INT32 = 270,
|
||||
SCAN_MAPS = 271,
|
||||
SCAN_MESSAGE = 272,
|
||||
SCAN_SEQUENCE = 273,
|
||||
SCAN_STRING = 274,
|
||||
SCAN_STRUCTURE = 275,
|
||||
SCAN_UINT16 = 276,
|
||||
SCAN_UINT32 = 277,
|
||||
SCAN_URL = 278,
|
||||
SCAN_PTYPE = 279,
|
||||
SCAN_PROG = 280,
|
||||
WORD_WORD = 281,
|
||||
WORD_STRING = 282
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int dapparse (DAPparsestate* parsestate);
|
||||
|
||||
#endif /* !YY_DAP_DAP_TAB_H_INCLUDED */
|
||||
|
@ -74,7 +74,7 @@ The oc library supports an <i>rc</i> file mechanism to allow the passing
|
||||
of a number of parameters to liboc and libcurl.
|
||||
<p>
|
||||
The file must be called one of the following names:
|
||||
".daprc", ".dodsrc"
|
||||
".daprc" or ".dodsrc"
|
||||
If both .daprc and .dodsrc exist, then
|
||||
the .daprc file will take precedence.
|
||||
<p>
|
||||
@ -149,21 +149,30 @@ specified the url for accessing the proxy:
|
||||
|
||||
<h2 class="break"><a name="REDIR"><u>Redirection-Based Authentication</u></a> </h2>
|
||||
Some sites provide authentication by using a third party site
|
||||
to to the authentication. One example is
|
||||
to do the authentication. One example is
|
||||
<a href="https://uat.urs.earthdata.nasa.gov">URS</a>,
|
||||
the EOSDIS User Registration System.
|
||||
<p>
|
||||
The process is usually as follows.
|
||||
<ol>
|
||||
<li>The client contacts the server of interest (SOI), the actual data provider.
|
||||
<li>The SOI sends a redirect to the client to connect to the URS system.
|
||||
<li>The client contacts the server of interest (SOI), the actual data provider
|
||||
using, typically http protocol.
|
||||
<li>The SOI sends a redirect to the client to connect to the URS system
|
||||
using the 'https' protocol.
|
||||
<li>The client authenticates with URS.
|
||||
<li>URS sends a redirect (with authorization information) to send
|
||||
the client back to the SOI to actually obtain the data.
|
||||
</ol>
|
||||
<p>
|
||||
In order for this to work with libcurl, the client will usually need
|
||||
to provide a .netrc file so that the redirection will work correctly.
|
||||
It turns out that libcurl uses the password in the .daprc file
|
||||
only for the initial connection. This causes problems because
|
||||
the redirected connection is the one that actually requires the password.
|
||||
This is where .netrc comes in. Libcurl will use .netrc for
|
||||
the redirected connection. It is possible to cause libcurl to use
|
||||
the .daprc password always, but this introduces a security hole.
|
||||
In summary, if you are using redirection, then you must create a .netrc
|
||||
file to hold the password for the site to which the redirection is sent.
|
||||
<p>
|
||||
The format of this .netrc file will contain content that
|
||||
typically look like this.
|
||||
<pre>
|
||||
|
@ -253,6 +253,8 @@ static void
|
||||
initialize(void)
|
||||
{
|
||||
struct OCCURLFLAG* p;
|
||||
size_t len = 0;
|
||||
|
||||
if(nflags == 0) { /* initialize */
|
||||
maxflag = -1;
|
||||
for(p=oc_curlflags;p->name;p++) {
|
||||
@ -267,7 +269,9 @@ initialize(void)
|
||||
}
|
||||
|
||||
|
||||
flagindices = (struct OCCURLFLAG**)calloc(1,(maxflag+(maxflag == -1 ? 2 : 1))*sizeof(struct OCCURLFLAG*));
|
||||
len = maxflag;
|
||||
if(maxflag == -1) len += 2; else len += 1;
|
||||
flagindices = (struct OCCURLFLAG**)calloc(1,len*sizeof(struct OCCURLFLAG*));
|
||||
for(p=oc_curlflags;p->name;p++)
|
||||
flagindices[p->flag] = p;
|
||||
}
|
||||
|
@ -214,21 +214,21 @@ ocset_flags_perlink(OCstate* state)
|
||||
OCerror stat = OC_NOERR;
|
||||
|
||||
/* Following are always set */
|
||||
stat = ocset_curlflag(state,CURLOPT_ENCODING);
|
||||
stat = ocset_curlflag(state,CURLOPT_NETRC);
|
||||
stat = ocset_curlflag(state,CURLOPT_TIMEOUT);
|
||||
stat = ocset_curlflag(state,CURLOPT_USERAGENT);
|
||||
stat = ocset_curlflag(state,CURLOPT_COOKIEJAR);
|
||||
stat = ocset_curlflag(state,CURLOPT_USERPWD);
|
||||
stat = ocset_curlflag(state,CURLOPT_PROXY);
|
||||
stat = ocset_curlflag(state,CURLOPT_USE_SSL);
|
||||
|
||||
stat = ocset_curlflag(state, CURLOPT_FOLLOWLOCATION);
|
||||
stat = ocset_curlflag(state, CURLOPT_MAXREDIRS);
|
||||
stat = ocset_curlflag(state, CURLOPT_ERRORBUFFER);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_ENCODING);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_NETRC);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_VERBOSE);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_TIMEOUT);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_USERAGENT);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_COOKIEJAR);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_USERPWD);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_PROXY);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state,CURLOPT_USE_SSL);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state, CURLOPT_FOLLOWLOCATION);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state, CURLOPT_MAXREDIRS);
|
||||
if(stat == OC_NOERR) stat = ocset_curlflag(state, CURLOPT_ERRORBUFFER);
|
||||
|
||||
/* Set the CURL. options */
|
||||
stat = oc_set_curl_options(state);
|
||||
if(stat == OC_NOERR) stat = oc_set_curl_options(state);
|
||||
|
||||
return stat;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user